]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
re PR c++/66216 (Defaulted Operators and constructors not working with aligned attribute)
[gcc.git] / gcc / c / ChangeLog
CommitLineData
22d03525
MP
12015-06-26 Marek Polacek <polacek@redhat.com>
2
3 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4 INDIRECT_REF_P.
5 * c-typeck.c (array_to_pointer_conversion): Likewise.
6 (build_unary_op): Likewise.
7 (c_finish_return): Likewise.
8
f0889939
AM
92015-06-25 Andrew MacLeod <amacleod@redhat.com>
10
11 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
12 * c-parser.c: Likewise.
13
8d67ee55
RS
142015-06-25 Richard Sandiford <richard.sandiford@arm.com>
15
16 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
17 instead of pointer_hash.
18 (detect_field_duplicates): Likewise.
19
0ae9bd27
MP
202015-06-25 Marek Polacek <polacek@redhat.com>
21
22 * c-array-notation.c: Use VAR_P throughout.
23 * c-decl.c: Likewise.
24 * c-objc-common.c: Likewise.
25 * c-parser.c: Likewise.
26 * c-typeck.c: Likewise.
27
62f9079a
MP
282015-06-25 Marek Polacek <polacek@redhat.com>
29
30 * c-decl.c: Use is_global_var throughout.
31 * c-parser.c: Likewise.
32 * c-typeck.c: Likewise.
33
abb226c9
AM
342015-06-17 Andrew MacLeod <amacleod@redhat.com>
35
36 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
37 * c-aux-info.c: Likewise.
38 * c-convert.c: Likewise.
39 * c-decl.c: Likewise.
40 * c-errors.c: Likewise.
41 * c-lang.c: Likewise.
42 * c-objc-common.c: Likewise.
43 * c-parser.c: Likewise.
44 * c-typeck.c: Likewise.
45
8cbababc
JH
462015-06-11 Jan Hubicka <hubicka@ucw.cz>
47
48 PR middle-end/66325
49 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
50 variants.
51
a0349665
PMR
522015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
53
54 * c-decl.c (pop_scope): Register the main translation unit
55 through the new debug hook.
56
13fdf2e2
AM
572015-06-08 Andrew MacLeod <amacleod@redhat.com>
58
59 * c-array-notation.c : Adjust include files.
60 * c-aux-info.c : Likewise.
61 * c-convert.c : Likewise.
62 * c-decl.c : Likewise.
63 * c-errors.c : Likewise.
64 * c-lang.c : Likewise.
65 * c-lang.h : Likewise.
66 * c-objc-common.c : Likewise.
67 * c-parser.c : Likewise.
68 * c-typeck.c : Likewise.
69
d7438551
AH
702015-06-05 Aldy Hernandez <aldyh@redhat.com>
71
72 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
73 immediately clobber it.
74 (c_write_global_declarations_1): Remove call to
75 check_global_declaration_1.
76 (c_write_global_declarations_2): Remove.
77 (c_write_final_cleanups): Rename from c_write_global_declarations.
78 Remove call to finalize_compilation_unit.
79 Remove calls to debugging hooks.
80 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
81 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
82 * c-tree.h: Remove c_write_global_declarations.
83
ecb9f223
AM
842015-06-04 Andrew MacLeod <amacleod@redhat.com>
85
86 * c-array-notation.c: Adjust includes for restructured coretypes.h.
87 * c-aux-info.c: Likewise.
88 * c-convert.c: Likewise.
89 * c-decl.c: Likewise.
90 * c-errors.c: Likewise.
91 * c-lang.c: Likewise.
92 * c-objc-common.c: Likewise.
93 * c-parser.c: Likewise.
94 * c-typeck.c: Likewise.
95
9482b620
MP
962015-06-04 Marek Polacek <polacek@redhat.com>
97
98 PR c/66341
99 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
100 it is a lvalue.
101
bc51ace3
PK
1022015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
103
104 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
105 Warn for empty struct.
106 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
107
ea5b45b6
AT
1082015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
109
110 * c-decl.c (start_function): Call plugin before parsing.
111 (finish_function): Call plugin after parsing.
112
c2d47482
PK
1132015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
114
115 PR c/49551
116 * c-decl.c (merge_decls): Merge DECL_COMMON.
117
a95492ab
JW
1182015-05-22 Jim Wilson <jim.wilson@linaro.org>
119
120 * Make-lang.in (check_gcc_pallelize): Define.
121
fd5c817a
MP
1222015-05-22 Marek Polacek <polacek@redhat.com>
123
124 PR c/47043
125 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
126 attributes.
127
c7b70a3c
MP
1282015-05-21 Marek Polacek <polacek@redhat.com>
129
130 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
131 DECL_BUILT_IN.
132
21b634ae
MP
1332015-05-20 Marek Polacek <polacek@redhat.com>
134
135 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
136 * c-typeck.c: Likewise.
137
296a8c2f
MP
1382015-05-19 Marek Polacek <polacek@redhat.com>
139
140 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
141
41b37d5e
JJ
1422015-05-19 Jakub Jelinek <jakub@redhat.com>
143
144 PR middle-end/66199
145 * c-parser.c (c_parser_omp_for_loop): Don't add
146 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
147 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
148 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
149 constructs.
150
fab27f52
MM
1512015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
152
153 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 154 swaps.
fab27f52 155
40de31cf
MLI
1562015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
157
158 PR fortran/44054
159 * c-objc-common.c (c_tree_printer): Replace locus pointer with
160 accessor function.
161
3aa3c9fc
MP
1622015-05-14 Marek Polacek <polacek@redhat.com>
163
164 PR c/66066
165 PR c/66127
166 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
167 rather than with 0.
168
c3388e62
DM
1692015-05-12 David Malcolm <dmalcolm@redhat.com>
170
171 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
172 to add a call to warn_for_misleading_indentation.
173 (c_parser_else_body): Likewise, adding param "else_loc".
174 (c_parser_if_statement): Check for misleading indentation.
175 (c_parser_while_statement): Likewise.
176 (c_parser_for_statement): Likewise.
177
755e528f
MP
1782015-05-08 Marek Polacek <polacek@redhat.com>
179
180 PR c/64918
181 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
182 (output_init_element): Likewise.
183
0173bd2a
MP
1842015-05-07 Marek Polacek <polacek@redhat.com>
185
186 PR c/65179
187 * c-typeck.c (build_binary_op): Warn when left shifting a negative
188 value.
189
9babc352
MP
1902015-04-30 Marek Polacek <polacek@redhat.com>
191
192 * c-typeck.c (set_init_label): Call error_at instead of error and
193 pass LOC to it.
194
ac9f18db
MP
195 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
196 the type of a decl.
197
ec3fba51
MP
198 * c-typeck.c (c_build_va_arg): Clarify the error message.
199
b811915d
TS
2002015-04-29 Thomas Schwinge <thomas@codesourcery.com>
201
202 * c-parser.c (c_parser_oacc_enter_exit_data): Use
203 OMP_STANDALONE_CLAUSES.
204
f3075008
MP
2052015-04-28 Marek Polacek <polacek@redhat.com>
206
207 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
208
4e81b788
MP
2092015-04-28 Marek Polacek <polacek@redhat.com>
210
211 PR c/65901
212 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
213
6c1db78e
MP
2142015-04-25 Marek Polacek <polacek@redhat.com>
215
216 PR c/52085
217 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
218 attribute.
219
5c4abbb8
MP
2202015-04-23 Marek Polacek <polacek@redhat.com>
221
222 PR c/65345
223 * c-decl.c (set_labels_context_r): New function.
224 (store_parm_decls): Call it via walk_tree_without_duplicates.
225 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
226 instead of create_tmp_var. Build TARGET_EXPR instead of
227 COMPOUND_EXPR.
228 (build_atomic_assign): Use create_tmp_var_raw instead of
229 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
230
06aca1d5
IV
2312015-04-20 Ilya Verbin <ilya.verbin@intel.com>
232
233 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
234 (c_parser_omp_target_update): Add missed %> to error_at ().
235
8fba1830
BRF
2362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
237
238 PR target/55143
239 * c-decl.c (c_default_pointer_mode): Remove definition.
240 * c-tree.h (c_default_pointer_mode): Remove declaration.
241
62021f64
TB
2422015-03-27 Tobias Burnus <burnus@net-b.de>
243
244 PR c/65586
245 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
246 error out.
247 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
248 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
249 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
250
9b65e171
JJ
2512015-03-19 Jakub Jelinek <jakub@redhat.com>
252
253 * c-decl.c (c_decl_attributes): Also add "omp declare target"
254 attribute for DECL_EXTERNAL VAR_DECLs.
255
17958621
JJ
2562015-03-11 Jakub Jelinek <jakub@redhat.com>
257
258 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
259 argument.
260
7ccb1a11
JJ
2612015-03-10 Jakub Jelinek <jakub@redhat.com>
262
263 PR c/65120
264 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
265 before preparing arguments to warn_logical_not_parentheses.
266
01177669
JJ
2672015-03-09 Jakub Jelinek <jakub@redhat.com>
268
269 PR c/65120
270 * c-typeck.c (parser_build_binary_op): Don't warn for
271 !!x == y or !b == y where b is _Bool.
272
802ac282
MP
2732015-03-09 Marek Polacek <polacek@redhat.com>
274
275 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
276 * c-decl.c (grokdeclarator): Likewise.
277 * c-typeck.c (build_binary_op): Likewise.
278
e5165b60
MP
2792015-02-27 Marek Polacek <polacek@redhat.com>
280
281 PR c/65228
282 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
283
065d214c
MP
2842015-02-14 Marek Polacek <polacek@redhat.com>
285
286 PR c/64768
287 * c-decl.c (grokdeclarator): Set the range of a flexible array member
288 declared through a typedef name.
289
e5d9235b
MP
2902015-02-13 Marek Polacek <polacek@redhat.com>
291
292 PR c/65050
293 * c-decl.c (grokdeclarator): Print also the type when giving
294 the error message about array's incomplete element type.
295
fa01ffcc
JJ
2962015-02-11 Jakub Jelinek <jakub@redhat.com>
297
298 PR c/64824
299 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
300 check in the POP macro.
301
c3e38a03
MP
3022015-02-09 Marek Polacek <polacek@redhat.com>
303
304 PR c/64856
305 * c-typeck.c (process_init_element): Don't always wrap
306 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
307 initializing a range of elements.
308
4886ec8e
JJ
3092015-02-04 Jakub Jelinek <jakub@redhat.com>
310
311 PR c/64824
312 PR c/64868
313 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
314
c3e38a03 3152015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
316
317 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
318 processing enum declaration.
319
7b33f0c8
MP
3202015-01-29 Marek Polacek <polacek@redhat.com>
321
322 PR c/64709
323 * c-typeck.c (pop_init_level): If constructor_elements has
324 exactly one element with integer_zerop value, set constructor_zeroinit
325 to 1. Remove braces around warning_init call.
326
dea63e49
JJ
3272015-01-27 Jakub Jelinek <jakub@redhat.com>
328
329 PR c/64766
330 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
331 of FUNCTION_DECLs with error_mark_node.
332
d38f7dce
JJ
3332015-01-26 Jakub Jelinek <jakub@redhat.com>
334
335 PR c/64778
336 * c-typeck.c (convert_arguments): Return -1 if there are
337 error_args, even if we've diagnosed too many arguments.
338
cbf5d0e7
RB
3392015-01-21 Richard Biener <rguenther@suse.de>
340
341 PR middle-end/64313
342 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
343 for builtins the user declared correctly.
344
41dbbb37
TS
3452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
346 Bernd Schmidt <bernds@codesourcery.com>
347 Cesar Philippidis <cesar@codesourcery.com>
348 James Norris <jnorris@codesourcery.com>
349 Jakub Jelinek <jakub@redhat.com>
350 Ilmir Usmanov <i.usmanov@samsung.com>
351
352 * c-parser.c: Include "gomp-constants.h".
353 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
354 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
355 Use OMP_CLAUSE_SET_MAP_KIND.
356 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
357 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
358 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
359 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
360 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
361 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
362 "copyout", "create", "delete", "deviceptr", "gang", "host",
363 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
364 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
365 "present_or_create", "pcreate", "seq", "self", "vector",
366 "vector_length", "wait", "worker".
367 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
368 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
369 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
370 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
371 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
372 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
373 (c_parser_oacc_data_clause_deviceptr)
374 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
375 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
376 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
377 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
378 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
379 (c_parser_oacc_parallel, c_parser_oacc_update)
380 (c_parser_oacc_wait): New functions.
381 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
382 (c_finish_oacc_data): New prototypes.
383 * c-typeck.c: Include "gomp-constants.h".
384 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
385 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
386 OMP_CLAUSE_SET_MAP_KIND.
387 (c_finish_oacc_parallel, c_finish_oacc_kernels)
388 (c_finish_oacc_data): New functions.
389 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
390 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
391 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
392 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
393 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
394 GOMP_MAP_FORCE_DEVICEPTR.
395
adfac8df
JJ
3962015-01-09 Michael Collison <michael.collison@linaro.org>
397
398 * c-array-notation.c: Include hash-set.h, machmode.h,
399 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
400 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
401 * c-aux-info.c: Ditto.
402 * c-convert.c: Ditto.
403 * c-decl.c: Ditto.
404 * c-errors.c: Ditto.
405 * c-lang.c: Dittoxs.
406 * c-objc-common.c: Ditto.
407 * c-parser.c: Ditto.
408 * c-typeck.c: Include hash-set.h, machmode.h,
409 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
410 fold-const.h, wide-int.h, inchash.h, real.h and
411 fixed-value.h due to flattening of tree.h.
412
2cc901dc
MP
4132015-01-07 Marek Polacek <polacek@redhat.com>
414
415 PR c/64417
416 * c-typeck.c (process_init_element): Disallow initialization of
417 a flexible array member with a string constant if the structure
418 is in an array.
419
5624e564
JJ
4202015-01-05 Jakub Jelinek <jakub@redhat.com>
421
e5341100
JJ
422 PR sanitizer/64344
423 * c-typeck.c (convert_for_assignment, c_finish_return): For
424 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
425 types also set in_late_binary_op around convert call.
426 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
427 to integral type casts, if not in_late_binary_op, pass c_fully_fold
428 result on expr as last argument to ubsan_instrument_float_cast,
429 if in_late_binary_op, don't use c_save_expr but save_expr.
430
5624e564
JJ
431 Update copyright years.
432
5bd012f8
MP
4332015-01-05 Marek Polacek <polacek@redhat.com>
434
435 PR c/64423
436 * c-typeck.c (build_array_ref): Pass loc down to
437 warn_array_subscript_with_type_char.
438
768952be
MU
4392014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
440
441 * c-typeck.c: New behavious for pointers to arrays with qualifiers
442 (common-pointer-type): For pointers to arrays take qualifiers from
443 element type.
444 (build_conditional_expr): Add warnings for lost qualifiers.
445 (comp-target-types): Allow pointers to arrays with different qualifiers.
446 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
447 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
448 to PEDWARN_FOR_QUALIFIERS.
449
8f94a8c4
JJ
4502014-12-17 Jakub Jelinek <jakub@redhat.com>
451
452 PR sanitizer/64289
453 * c-convert.c: Include ubsan.h.
454 (convert): For real -> integral casts and
455 -fsanitize=float-cast-overflow don't call convert_to_integer, but
456 instead instrument the float cast directly.
457
b731b390
JJ
4582014-11-29 Jakub Jelinek <jakub@redhat.com>
459
460 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
461 c_finish_stmt_expr): Remove NULL last argument from
462 create_tmp_var_raw and create_tmp_var calls.
463 * c-array-notation.c (fix_builtin_array_notation_fn,
464 build_array_notation_expr, fix_conditional_array_notations_1,
465 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
466
541e35a6
MP
4672014-11-28 Marek Polacek <polacek@redhat.com>
468
469 PR c/63862
470 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
471 convert the right operand to integer type.
472
b286be94
MP
4732014-11-25 Marek Polacek <polacek@redhat.com>
474
475 PR c/63877
476 * c-decl.c (start_function): Disable -Wmissing-declarations warning
477 for inline functions.
478
aa7da51a
JJ
4792014-11-21 Jakub Jelinek <jakub@redhat.com>
480
481 PR target/63764
482 * c-typeck.c (build_array_ref): Adjust
483 convert_vector_to_pointer_for_subscript caller. If it returns true,
484 call non_lvalue_loc on the result.
485
d876207f
RB
4862014-11-11 Richard Biener <rguenther@suse.de>
487
488 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
489 to true.
490
e5e44252
AK
4912014-11-10 Andi Kleen <ak@linux.intel.com>
492
493 PR c/60804
494 * c-parser.c (c_parser_statement_after_labels): Call
495 check_no_cilk.
496 (c_parser_if_statement): Dito.
497 (c_parser_switch_statement): Dito.
498 (c_parser_while_statement): Dito.
499 (c_parser_do_statement): Dito.
500 (c_parser_for_statement): Dito.
501 * c-typeck.c (c_finish_loop): Dito.
502
13c21655
PC
5032014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
504
505 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
506 OPT_Wshift_count_overflow in the warnings.
507
2d51fcef
MP
5082014-10-30 Marek Polacek <polacek@redhat.com>
509
510 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
511 print the stripped version as well, if they're not the same.
512
ef4bddc2
RS
5132014-10-29 Richard Sandiford <richard.sandiford@arm.com>
514
515 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
516 machine_mode.
517
c582198b
AM
5182014-10-28 Andrew MacLeod <amacleod@redhat.com>
519
520 * c-decl.c: Adjust include files.
521 * c-parser.c: Ditto.
522
ddc8de03
PM
5232014-10-27 Phil Muldoon <pmuldoon@redhat.com>
524 Tom Tromey <tromey@redhat.com>
525
526 * c-tree.h (enum c_oracle_request): New.
527 (c_binding_oracle_function): New typedef.
528 (c_binding_oracle, c_pushtag, c_bind): Declare.
529 * c-decl.c (c_binding_oracle): New global.
530 (I_SYMBOL_CHECKED): New macro.
531 (i_symbol_binding): New function.
532 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
533 (I_TAG_CHECKED): New macro.
534 (i_tag_binding): New function.
535 (I_TAG_BINDING, I_TAG_DECL): Redefine.
536 (I_LABEL_CHECKED): New macro.
537 (i_label_binding): New function.
538 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
539 (c_print_identifier): Save and restore c_binding_oracle.
540 (c_pushtag, c_bind): New functions.
541
60393bbc
AM
5422014-10-27 Andrew MacLeod <amacleod@redhat.com>
543
544 * c-typeck.c: Adjust include files.
545
d723bb7c
MLI
5462014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
547
548 PR c++/53061
549 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
550 initialization here...
551 (c_initialize_diagnostics): ... but here. Set defaults after
552 building pretty-printer.
553
1bc5a451
MP
5542014-10-23 Marek Polacek <polacek@redhat.com>
555
556 PR c/63626
557 * c-decl.c (pop_scope): Don't print warning in external_scope.
558
4435bb92
MP
5592014-10-19 Marek Polacek <polacek@redhat.com>
560
561 PR c/63567
562 * c-typeck.c (output_init_element): Allow initializing objects with
563 static storage duration with compound literals even in C99 and add
564 pedwarn for it.
565
7278465e
MP
5662014-10-17 Marek Polacek <polacek@redhat.com>
567
568 PR c/63567
569 * c-typeck.c (digest_init): Allow initializing objects with static
570 storage duration with compound literals even in C99 and add pedwarn
571 for it.
572
d9b7be2e
MP
5732014-10-17 Marek Polacek <polacek@redhat.com>
574
575 PR c/63543
576 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
577 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
578 error multiple times. Print the type.
579
f406ae1f
MP
5802014-10-17 Marek Polacek <polacek@redhat.com>
581
582 PR c/63549
583 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
584 type.
585
92574c7c
MP
5862014-10-17 Marek Polacek <polacek@redhat.com>
587
588 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
589 (start_function): Use OPT_Wimplicit_int instead of 0.
590 (store_parm_decls_oldstyle): Likewise.
591
1bc4a978
MT
5922014-10-17 Alan Modra <amodra@gmail.com>
593
594 PR middle-end/61848
595 * c-decl.c (merge_decls): Don't merge section name or tls model
596 to newdecl symtab node, instead merge to olddecl. Override
597 existing olddecl section name. Set tls_model for all thread-local
598 vars, not just OMP thread-private ones. Remove incorrect comment.
599
83685514
AM
6002014-10-16 Andrew MacLeod <amacleod@redhat.com>
601
602 * c-decl.c: Adjust include files.
603
78a7c317
DD
6042014-10-14 DJ Delorie <dj@redhat.com>
605
606 * c-parser.c (c_parse_init): Add RID entries for each __intN.
607 (c_token_starts_typename): Check all __intN, not just __int128.
608 (c_token_starts_declspecs): Likewise.
609 (c_parser_declspecs): Likewise.
610 (c_parser_attribute_any_word): Likewise.
611 (c_parser_objc_selector): Likewise.
612 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
613 (struct c_declspecs): Add int_n_idx field to record *which* __intN
614 is specified.
615 * c-decl.c (declspecs_add_type): Check for all __intN, not just
616 __int128.
617 (finish_declspecs): Likewise.
618
74d98c1e
AB
6192014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
620
621 * c-parser.c (c_parser_all_labels): New function to replace
622 the duplicate code.
623 (c_parser_statement): Call the new function.
624
84937de2
MP
6252014-10-09 Marek Polacek <polacek@redhat.com>
626
627 PR c/63480
628 * c-typeck.c (pop_init_level): Don't warn about initializing
629 with { }.
630
0382aaa0
MP
6312014-10-07 Marek Polacek <polacek@redhat.com>
632
633 PR c/59717
634 * c-decl.c (header_for_builtin_fn): New function.
635 (implicitly_declare): Suggest which header to include.
636
7a0ca710
MP
6372014-10-07 Marek Polacek <polacek@redhat.com>
638
639 * c-convert.c (convert): Use error_operand_p.
640 * c-typeck.c (require_complete_type): Likewise.
641 (really_atomic_lvalue): Likewise.
642 (digest_init): Likewise.
643 (handle_omp_array_sections_1): Likewise.
644
6bc8a126
MP
6452014-10-03 Marek Polacek <polacek@redhat.com>
646
647 PR c/63453
648 * c-decl.c (pop_scope): Don't warn about "inline function declared
649 but never defined" for functions marked with gnu_inline attribute.
650
d90c0a59
JJ
6512014-09-25 Jakub Jelinek <jakub@redhat.com>
652
653 PR c++/63249
654 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
655 on low_bound and length.
656
083e891e
MP
6572014-09-24 Marek Polacek <polacek@redhat.com>
658
659 PR c/61405
660 PR c/53874
661 * c-parser.c: Don't define CPP_KEYWORD.
662 (c_parser_switch_statement): Pass original type to c_finish_case.
663 * c-tree.h (c_finish_case): Update declaration.
664 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
665 conditionally to c_do_switch_warnings.
666
8d95fe25
MP
6672014-09-03 Marek Polacek <polacek@redhat.com>
668
669 PR c/62024
670 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
671 conversions.
672
9a771876
JJ
6732014-09-02 Jakub Jelinek <jakub@redhat.com>
674 Balaji V. Iyer <balaji.v.iyer@intel.com>
675 Igor Zamyatin <igor.zamyatin@intel.com>
676
677 * c-parser.c (c_parser_cilk_for): New function.
678 (c_parser_cilk_grainsize): Likewise.
679 (c_get_temp_regvar): Likewise.
680 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
681 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
682 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
683 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
684 case.
685
b7679d96
CG
6862014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
687
688 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
689 with using HOST_WIDE_INT without truncation to 'int'
690
59ea0364
MP
6912014-08-22 Marek Polacek <polacek@redhat.com>
692
693 PR c++/62199
694 * c-typeck.c (parser_build_binary_op): Adjust call to
695 warn_logical_not_parentheses.
696
671a475e
IZ
6972014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
698
699 PR other/62008
700 * c-parser.c (c_parser_array_notation): Check for correct
701 type of an array added.
702
04159acf
MP
7032014-08-19 Marek Polacek <polacek@redhat.com>
704
705 PR c++/62153
706 * c-typeck.c (build_binary_op): If either operand of a comparison
707 is a boolean expression, call maybe_warn_bool_compare.
708
c77935ee
PP
7092014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
710
711 PR c/45584
712 * c-typeck.c (build_c_cast): Do a conversion even when the
713 TYPE_MAIN_VARIANTs are the same.
714
35aff4fb
MP
7152014-08-19 Marek Polacek <polacek@redhat.com>
716
717 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
718 pedwarn_c99 instead of pedwarn.
719 (grokfield): Likewise.
720 (warn_defaults_to): New function.
721 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
722 Unconditionally call pedwarn_c99 instead of pedwarn.
723 (start_function): Call warn_defaults_to instead of pedwarn_c99.
724 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
725 check flag_isoc11 before.
726 * c-errors.c (pedwarn_c99): Change the return type to bool.
727 Handle -Wc99-c11-compat.
728 * c-parser.c (disable_extension_diagnostics): Handle
729 warn_c99_c11_compat.
730 (restore_extension_diagnostics): Likewise.
731 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
732 instead of pedwarn, don't check flag_isoc11 before.
733 (c_parser_declspecs): Likewise.
734 (c_parser_alignas_specifier): Likewise.
735 (c_parser_alignof_expression): Likewise.
736 (c_parser_generic_selection): Likewise.
737 * c-tree.h (pedwarn_c99): Update declaration.
738 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
739 of pedwarn_c99.
740
177cce46
MP
7412014-08-19 Marek Polacek <polacek@redhat.com>
742
743 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
744 to pedwarn_c90.
745 * c-errors.c: Include "opts.h".
746 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
747 * c-parser.c (disable_extension_diagnostics): Handle negative value
748 of warn_c90_c99_compat, too.
749 (restore_extension_diagnostics): Likewise.
750 (c_parser_compound_statement_nostart): Pass
751 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
752
6dc99c33
MP
7532014-08-12 Marek Polacek <polacek@redhat.com>
754
755 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
756 Add pedwarn.
757 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
758 Likewise.
759 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
760
f3bede71
MP
7612014-08-10 Marek Polacek <polacek@redhat.com>
762
763 PR c/51849
764 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
765 Call pedwarn_c90 instead of pedwarn.
766 (check_bitfield_type_and_width): Likewise.
767 (declspecs_add_qual): Likewise.
768 (declspecs_add_type): Likewise.
769 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
770 Adjust to only call pedwarn_c90.
771 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
772 pedwarn_c90 instead of pedwarn.
773 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
774 * c-parser.c (disable_extension_diagnostics): Handle
775 warn_c90_c99_compat.
776 (restore_extension_diagnostics): Likewise.
777 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
778 pedwarn_c90 instead of pedwarn.
779 (c_parser_initelt): Likewise.
780 (c_parser_postfix_expression): Likewise.
781 (c_parser_postfix_expression_after_paren_type): Likewise.
782 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
783 * c-tree.h: Fix formatting.
784 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
785 pedwarn_c90 instead of pedwarn.
786
9f25a338
TS
7872014-08-07 Trevor Saunders <tsaunders@mozilla.com>
788
789 * c-typeck.c: Remove include of pointer-set.h.
790
044331a8
MP
7912014-08-07 Marek Polacek <polacek@redhat.com>
792
793 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
794
b787e7a2
TS
7952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
796
797 * c-typeck.c: Use hash_map instead of pointer_map.
798
6e2830c3
TS
7992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
800
801 * c-decl.c: Use hash_set instead of pointer_set.
802
a7ee52fb
IZ
8032014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
804
805 PR middle-end/61455
806 * c-array-notation.c (expand_array_notations): Handling
807 of DECL_EXPR added.
808
b4dfdc11
MG
8092014-07-31 Marc Glisse <marc.glisse@inria.fr>
810
811 PR c++/60517
812 * c-typeck.c (c_finish_return): Return 0 instead of the address of
813 a local variable.
814
976d5a22
TT
8152014-07-30 Tom Tromey <tromey@redhat.com>
816
817 * c-typeck.c (struct constructor_stack) <designator_depth>: New
818 field.
819 (really_start_incremental_init, push_init_level): Initialize
820 designator_depth.
821 (pop_init_level): Set global designator_depth.
822 (process_init_element): Check for designated_init attribute.
823
30281de2
MP
8242014-07-20 Marek Polacek <polacek@redhat.com>
825
826 PR c/61852
827 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
828 (implicitly_declare): Pass location to implicit_decl_warning.
829
b108f48f
JJ
8302014-07-14 Jakub Jelinek <jakub@redhat.com>
831
832 PR middle-end/61294
833 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
834 If non-NULL, call c_parser_check_literal_zero.
835 (c_parser_check_literal_zero): New function.
836 (c_parser_postfix_expression_after_primary): Adjust
837 c_parser_expr_list caller, handle -Wmemset-transposed-args.
838
773ec47f
MP
8392014-07-06 Marek Polacek <polacek@redhat.com>
840
841 PR c/6940
842 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
843 * c-tree.h (C_ARRAY_PARAMETER): Define.
844 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
845 function parameter.
846
22e1cf1c
JH
8472014-07-02 Jan Hubicka <hubicka@ucw.cz>
848 Chen Gang <gang.chen.5i5j@gmail.com>
849
850 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
851 releasing symbol.
852
52ec0ea3
MP
8532014-07-01 Marek Polacek <polacek@redhat.com>
854
855 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
856 instead of 0 to WARN_FOR_ASSIGNMENT.
857
d5c3d343
MP
8582014-07-01 Marek Polacek <polacek@redhat.com>
859
860 PR c/58286
861 * c-typeck.c (convert_for_assignment): Pass
862 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
863
6a7253a4
MP
8642014-06-30 Marek Polacek <polacek@redhat.com>
865
866 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
867 has no_sanitize_undefined attribute.
868
5e88a8f4
IZ
8692014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
870
871 PR middle-end/57541
872 * c-array-notation.c (fix_builtin_array_notation_fn):
873 Check for 0 arguments in builtin call. Check that bultin argument is
874 correct.
875 * c-parser.c (c_parser_array_notation): Check for incorrect initial
876 index.
877
9698b078
SH
8782014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
879
880 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
881 qualifiers in __auto_type for atomic types.
882 (c_parser_typeof_specifier): Discard all type qualifiers in
883 __typeof__ for atomic types.
884
6e07c515
MP
8852014-06-25 Marek Polacek <polacek@redhat.com>
886
887 PR c/61162
888 * c-parser.c (c_parser_statement_after_labels): Pass the location of
889 the return expression to c_finish_return.
890
da6f124d
JJ
8912014-06-25 Jakub Jelinek <jakub@redhat.com>
892
893 * c-typeck.c (c_finish_omp_clauses): Make sure
894 OMP_CLAUSE_LINEAR_STEP has correct type.
895
c203e8a7
TS
8962014-06-24 Trevor Saunders <tsaunders@mozilla.com>
897
898 * c-decl.c: Adjust.
899
56ad0e38
JJ
9002014-06-24 Jakub Jelinek <jakub@redhat.com>
901
902 * c-parser.c (c_parser_omp_for_loop): For
903 #pragma omp parallel for simd move lastprivate clause from parallel
904 to for rather than simd.
905
47c2554f
MP
9062014-06-23 Marek Polacek <polacek@redhat.com>
907
908 * c-typeck.c (parser_build_binary_op): Don't call
909 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
910
56363ffd
JH
9112014-06-15 Jan Hubicka <hubicka@ucw.cz>
912
913 * c-parser.c (c_parser_omp_threadprivate): Likewise.
914 * c-decl.c (merge_decls): Likewise.
915
d7ff7ae5
MP
9162014-06-09 Marek Polacek <polacek@redhat.com>
917
918 PR c/36446
919 * c-typeck.c (error_init): Call inform instead of error_at.
920 (pedwarn_init): Call inform instead of pedwarn.
921 (warning_init): Call inform instead of warning_at.
922
24d047a3
JH
9232014-06-07 Jan Hubicka <hubicka@ucw.cz>
924
925 * c-decl.c (merge_decls): Use set_decl_section_name.
926 (duplicate_decls): Remove node if it exists.
927
9bac5cbb
G
9282014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
929
930 PR c/53119
931 * c-typeck.c (push_init_level, process_init_element,
932 pop_init_level): Correct check for zero initialization, move
933 missing brace warning to respect zero initialization.
934
8ffcdea8
MP
9352014-06-05 Marek Polacek <polacek@redhat.com>
936
937 PR c/56724
938 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
939
742938c9
MP
9402014-06-05 Marek Polacek <polacek@redhat.com>
941
942 PR c/49706
943 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
944 on the left hand side operand of a comparison.
945
6447c55d
MP
9462014-06-05 Marek Polacek <polacek@redhat.com>
947
948 PR c/48062
949 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
950 Print note only if the warning was printed.
951
9dc7743c
IZ
9522014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
953
954 PR c/58942
955 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
956 with a pointer.
957
fedfecef
MP
9582014-06-03 Marek Polacek <polacek@redhat.com>
959
960 PR c/60439
961 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
962 c_start_case.
963 * c-tree.h (c_start_case): Update.
964 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
965 switch condition has boolean value.
966
9b2b7279
AM
9672014-06-02 Andrew MacLeod <amacleod@redhat.com>
968
969 * c-decl.c: Include builtins.h.
970 * c-parser.c: Likewise.
971
5c1bc275
MP
9722014-05-27 Marek Polacek <polacek@redhat.com>
973
974 PR c/56724
975 * c-typeck.c (convert_arguments): Get location of a parameter. Change
976 error and warning calls to error_at and warning_at. Pass location of
977 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
978 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
979 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
980
97563bc8
IZ
9812014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
982
983 PR c/61191
984 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
985 function parameters.
986
aede2c10
JH
9872014-05-23 Jan Hubicka <hubicka@ucw.cz>
988
989 * c-decl.c (merge_decls): Preserve symtab node pointers.
990 (duplicate_decls): Free new decl.
991
edbba2ce
TS
9922014-05-23 Thomas Schwinge <thomas@codesourcery.com>
993
f3316c6d
TS
994 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
995 initialization.
996
edbba2ce
TS
997 * c-parser.c (c_parser_omp_target): Return bool values.
998
68c81f24
TS
9992014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1000
1001 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1002 num_teams_loc variable to num_thread_limit_loc.
1003
632f2871
RS
10042014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1005
1006 * c-array-notation.c (expand_array_notations): Use void_node
1007 instead of void_zero_node.
1008
766090c2
TS
10092014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1010
1011 * c-decl.c (finish_struct): Adjust.
1012 (finish_enum): Likewise.
1013 (bind): Adjust.
1014 (record_inline_static): Likewise.
1015 (push_scope): Likewise.
1016 (make_label): Likewise.
1017 (lookup_label_for_goto): Likewise.
1018 (finish_struct): Likewise.
1019 (finish_enum): Likewise.
1020 (store_parm_decls): Likewise.
1021 (c_push_function_context): Likewise.
1022 * c-lang.h: Remove usage of variable_size gty attribute.
1023 * c-parser.c (c_parse_init): Adjust.
1024 (c_parse_file): Likewise.
1025
2b107f6b
MP
10262014-05-13 Marek Polacek <polacek@redhat.com>
1027
1028 PR c/61162
1029 * c-typeck.c (convert_for_assignment): Pass location to
1030 WARN_FOR_ASSIGNMENT instead of input_location.
1031
d033409e
MP
10322014-05-10 Marek Polacek <polacek@redhat.com>
1033
1034 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1035 maybe_warn_string_init.
1036 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1037 maybe_warn_string_init.
1038 * c-tree.h (maybe_warn_string_init): Update declaration.
1039 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1040 Call pedwarn_init with loc instead of with input_location.
1041 (digest_init): Pass init_loc to maybe_warn_string_init.
1042 (pop_init_level): Call pedwarn_init with loc instead of with
1043 input_location.
1044 (set_init_index): Likewise.
1045 (process_init_element): Likewise.
1046
ea58ef42
MP
10472014-05-09 Marek Polacek <polacek@redhat.com>
1048
1049 PR c/61096
1050 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1051 (c_parser_initelt): Pass location to set_init_label. Pass array index
1052 location to set_init_index.
1053 * c-tree.h (push_init_level): Update declaration.
1054 (pop_init_level): Likewise.
1055 (set_init_index): Likewise.
1056 (set_init_label): Likewise.
1057 * c-typeck.c (error_init): Add location parameter. Call error_at
1058 instead of error.
1059 (digest_init): Pass init_loc to error_init.
1060 (really_start_incremental_init):
1061 (push_init_level): Add location parameter. Pass loc to pop_init_level
1062 and error_init.
1063 (pop_init_level): Likewise.
1064 (set_designator): Add location parameter. Pass loc to pop_init_level,
1065 push_init_level, and error_init.
1066 (set_init_index): Add location parameter. Pass loc to error_init and
1067 set_designator.
1068 (set_init_label): Likewise.
1069 (output_init_element): Pass loc to error_init.
1070 (process_init_element): Pass loc to error_init, pop_init_level,
1071 pedwarn_init, and push_init_level.
1072
661a0813
MP
10732014-05-09 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/50459
1076 * c-parser.c (c_parser_attributes): Parse the arguments as an
1077 expression-list if the attribute takes identifier.
1078
2793eeab
MP
10792014-05-08 Marek Polacek <polacek@redhat.com>
1080
1081 PR c/61053
1082 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1083 TYPE_ALIGN_UNIT.
1084
f827930a
MP
10852014-05-08 Marek Polacek <polacek@redhat.com>
1086
1087 PR c/61077
1088 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1089 of main.
1090
1d60af08
KZ
10912014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1092 Mike Stump <mikestump@comcast.net>
1093 Richard Sandiford <rdsandiford@googlemail.com>
1094
1095 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1096 (finish_enum): Use wide-int interfaces.
1097 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1098 * c-typeck.c (build_c_cast): Likewise.
1099 (set_nonincremental_init_from_string): Likewise.
1100 (c_tree_equal): Likewise.
1101
a0e24419
MP
11022014-05-02 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/25801
1105 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1106 Return size_one_node when the type is not complete.
1107 (pointer_diff): Remove comment.
1108 (build_unary_op): Improve error messages.
1109
19fc9faa
MP
11102014-05-02 Marek Polacek <polacek@redhat.com>
1111
1112 * c-typeck.c (c_finish_return): Separate warning_at calls.
1113
63bc4e87
MP
11142014-05-02 Marek Polacek <polacek@redhat.com>
1115
1116 * c-tree.h (error_init): Remove declaration.
1117 (pedwarn_init): Likewise.
1118 * c-typeck.c (error_init): Make static and move above.
1119 (pedwarn_init): Likewise.
1120 (warning_init): Move above.
1121 (maybe_warn_string_init): Likewise.
1122
4bd2511b
JL
11232014-05-01 Jeff Law <law@redhat.com>
1124
1125 Revert:
1126
1127 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1128 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1129 avoid goto.
1130
6a358dcb
MP
11312014-05-02 Marek Polacek <polacek@redhat.com>
1132
1133 PR c/60784
1134 * c-typeck.c (push_init_level): Set constructor_designated to
1135 p->designated for structures.
1136
ae5ebda4
MP
11372014-05-01 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/60915
1140 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1141 function-definition has an attribute after the declarator.
1142
96b40f8d
MP
11432014-05-01 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/60257
1146 * c-typeck.c (warning_init): Add location_t parameter. Call
1147 warning_at instead of warning.
1148 (push_init_level): Pass input_location to warning_init.
1149 (add_pending_init): Add location_t parameter. Pass loc to
1150 warning_init.
1151 (set_nonincremental_init): Pass input_location to add_pending_init.
1152 (set_nonincremental_init_from_string): Likewise.
1153 (output_init_element): Pass loc to warning_init and to
1154 add_pending_init.
1155
32e00768
MP
11562014-05-01 Marek Polacek <polacek@redhat.com>
1157
1158 PR c/43395
1159 * c-typeck.c (c_finish_return): Distinguish between label and variable
1160 when warning about returning local address.
1161
c9379ce2
MP
11622014-05-01 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/29467
1165 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1166 in C89 mode.
1167
d00887e8
MP
11682014-05-01 Marek Polacek <polacek@redhat.com>
1169
1170 PR c/43245
1171 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1172 instead of 0 to WARN_FOR_QUALIFIERS.
1173
5436fa2e
MP
11742014-05-01 Marek Polacek <polacek@redhat.com>
1175
1176 PR c/56989
1177 * c-typeck.c (default_conversion): Use better location for
1178 error call.
1179
f8ed5150
MP
11802014-04-30 Marek Polacek <polacek@redhat.com>
1181
1182 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1183 also when SANITIZE_FLOAT_DIVIDE is on.
1184
8337d1db
MP
11852014-04-30 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/60139
1188 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1189 and pedwarn_init. Use loc insted of input_location.
1190
c4bdc42f
MP
11912014-04-30 Marek Polacek <polacek@redhat.com>
1192
1193 PR c/60351
1194 * c-typeck.c (build_binary_op): Use location when warning about
1195 shift count.
1196
45484dcf
MP
11972014-04-25 Marek Polacek <polacek@redhat.com>
1198
1199 PR c/18079
1200 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1201 always_inline/noinline and hot/cold attributes.
1202
34cf811f
MP
12032014-04-25 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/60114
1206 * c-parser.c (c_parser_initelt): Pass input_location to
1207 process_init_element.
1208 (c_parser_initval): Pass loc to process_init_element.
1209 * c-tree.h (process_init_element): Adjust declaration.
1210 * c-typeck.c (push_init_level): Pass input_location to
1211 process_init_element.
1212 (pop_init_level): Likewise.
1213 (set_designator): Likewise.
1214 (output_init_element): Add location_t parameter. Pass loc to
1215 digest_init.
1216 (output_pending_init_elements): Pass input_location to
1217 output_init_element.
1218 (process_init_element): Add location_t parameter. Pass loc to
1219 output_init_element.
1220
42056eac
JJ
12212014-04-24 Jakub Jelinek <jakub@redhat.com>
1222
1223 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1224 atomic-clause, allow comma in between atomic-clause and
1225 seq_cst.
1226
e162a134
JJ
12272014-04-22 Jakub Jelinek <jakub@redhat.com>
1228
1229 PR c/59073
1230 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1231 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1232
2f6babac
IZ
12332014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1234
1235 PR middle-end/60469
1236 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1237 create_tmp_var instead build_decl for creating temps.
1238 (build_array_notation_expr): Likewise.
1239 (fix_conditional_array_notations_1): Likewise.
1240 (fix_array_notation_expr): Likewise.
1241 (fix_array_notation_call_expr): Likewise.
1242
8edbfaa6
JJ
12432014-03-28 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c++/60689
1246 * c-tree.h (c_build_function_call_vec): New prototype.
1247 * c-typeck.c (build_function_call_vec): Don't call
1248 resolve_overloaded_builtin here.
1249 (c_build_function_call_vec): New wrapper function around
1250 build_function_call_vec. Call resolve_overloaded_builtin here.
1251 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1252 Call c_build_function_call_vec instead of build_function_call_vec.
1253 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1254 * c-decl.c (finish_decl): Likewise.
1255
7485aeea
MLI
12562014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1257
1258 PR c/55383
1259 * c-typeck.c: Use correct format string in cast-qual warning
1260
b17a8b07
TS
12612014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1262
1263 * c-decl.c (c_decl_attributes): Use
1264 lang_hooks.types.omp_mappable_type.
1265 * c-typeck.c (c_finish_omp_clauses): Likewise.
1266
3af9c5e9
MP
12672014-03-06 Marek Polacek <polacek@redhat.com>
1268
1269 PR c/60197
1270 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1271 of checking tree code.
1272
1c9f5f33
PK
12732014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1274
1275 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1276 (c_parser_parameter_declaration): Likewise.
1277
cc28fc7f
MP
12782014-02-19 Marek Polacek <polacek@redhat.com>
1279
1280 PR c/60195
1281 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1282 Call mark_exp_read on exp.value.
1283 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1284 TREE_ADDRESSABLE on old instead of val.
1285 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1286
b581c05c
PK
12872014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1288
1289 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1290 C_EXPR_APPEND by vec_safe_push.
1291 * c-tree.h (C_EXPR_APPEND): Remove.
1292
81e5eca8
MP
12932014-01-31 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/59963
1296 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1297 build_function_call_vec.
1298 (build_function_call): Likewise.
1299 (build_atomic_assign): Likewise.
1300 (build_function_call_vec): Add arg_loc parameter. Use it.
1301 (convert_arguments): Likewise.
1302 (convert_for_assignment): Rename rhs_loc to expr_loc.
1303 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1304 (c_parser_objc_keywordexpr): Likewise.
1305 (c_parser_postfix_expression_after_primary): Call
1306 build_function_call_vec with expr_loc rather than op_loc.
1307 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1308 build_function_call_vec.
1309 (c_parser_expr_list): Add locations parameter. Fill it with locations
1310 of function arguments.
1311 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1312
68fca595
MP
13132014-01-30 Marek Polacek <polacek@redhat.com>
1314
1315 PR c/59940
1316 * c-typeck.c (build_function_call_vec): Use loc parameter.
1317 (convert_arguments): Add location parameter. Use it.
1318 (ep_convert_and_check): Likewise.
1319 (build_atomic_assign): Adjust convert_for_assignment call.
1320 (build_modify_expr): Likewise.
1321 (digest_init): Likewise.
1322 (c_finish_return): Likewise.
1323 (build_conditional_expr): Adjust ep_convert_and_check calls.
1324 (convert_for_assignment): Add rhs_loc parameter. Use it.
1325 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1326 calls.
1327
fa337f3a
RB
13282014-01-30 Richard Biener <rguenther@suse.de>
1329
1330 PR c/59905
1331 * c-typeck.c (build_function_call_vec): Do not replace calls
1332 to a function via an incompatible type with a runtime abort.
1333
b72271b9
BI
13342014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1335
1336 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1337 flag_enable_cilkplus with flag_cilkplus.
1338 (c_parser_direct_declarator_inner): Likewise.
1339 (c_parser_attribute_any_word): Likewise.
1340 (c_parser_attributes): Likewise.
1341 (c_parser_compound_statement): Likewise.
1342 (c_parser_statement_after_labels): Likewise.
1343 (c_parser_if_statement): Likewise.
1344 (c_parser_switch_statement): Likewise.
1345 (c_parser_do_statement): Likewise.
1346 (c_parser_for_statement): Likewise.
1347 (c_parser_unary_expression): Likewise.
1348 (c_parser_postfix_expression): Likewise.
1349 (c_parser_postfix_expression_after_primary): Likewise.
1350 (c_parser_postfix_expression_after_primary): Likewise.
1351 (c_parser_omp_clause_name): Likewise.
1352 (c_finish_omp_declare_simd): Likewise.
1353 (c_parser_cilk_verify_simd): Likewise.
1354 * c-typeck.c (build_array_ref): Likewise.
1355 (build_function_call_vec): Likewise.
1356 (convert_arguments): Likewise.
1357 (build_compound_expr): Likewise.
1358 (c_finish_return): Likewise.
1359 (c_finish_if_stmt): Likewise.
1360 (c_finish_loop): Likewise.
1361 (build_binary_op): Likewise.
1362
393e8e8b
MP
13632014-01-23 Marek Polacek <polacek@redhat.com>
1364
1365 PR c/59846
1366 * c-typeck.c (parser_build_binary_op): Use location instead of
1367 input_location.
1368 (build_binary_op): Pass location to shorten_compare.
1369
f04dda30
MP
13702014-01-23 Marek Polacek <polacek@redhat.com>
1371
1372 PR c/58346
1373 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1374 an empty aggregate.
1375
789eadcd
MP
13762014-01-23 Marek Polacek <polacek@redhat.com>
1377
1378 PR c/59871
1379 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1380 of a comma expression.
1381 (emit_side_effect_warnings): Likewise.
1382
40f14e9f
BI
13832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1384
1385 PR c/59825
1386 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1387 function to use walk_tree and moved a lot of its functionality to
1388 expand_array_notations.
1389 (expand_array_notations): New function.
1390
74558dd9
BI
13912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1392
1393 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1394 attribute an attribute without value.
1395
652fea39
JJ
13962014-01-23 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR middle-end/58809
1399 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1400 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1401
f34f1c87
MP
14022014-01-22 Marek Polacek <polacek@redhat.com>
1403
1404 PR c/59891
1405 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1406 of remove_c_maybe_const_expr on op1 and op2.
1407
241f845a
JJ
14082014-01-15 Jakub Jelinek <jakub@redhat.com>
1409
1410 PR c/58943
1411 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1412 effects, preevaluate rhs using SAVE_EXPR first.
1413
9a74f20c
BI
14142014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1415
1416 PR c++/59631
1417 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1418 statements with if-elseif statements.
1419
96066ce1
MP
14202014-01-06 Marek Polacek <polacek@redhat.com>
1421
1422 PR c/57773
1423 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1424 defined bit-field types only in ISO C.
1425
23a5b65a
RS
14262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1427
1428 Update copyright years
1429
f9030485
RS
14302014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1431
1432 * c-array-notation.c: Use the standard form for the copyright notice.
1433
41958c28
BI
14342013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1435
1436 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1437 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1438 field in parser is not empty. If not-empty, call the function
1439 c_parser_finish_omp_declare_simd.
1440 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1441 between SIMD-enabled functions and #pragma simd. Added new parameter.
1442 (c_parser_cilk_all_clauses): Modified the usage of the function
1443 c_parser_cilk_clause_vectorlength as mentioned above.
1444 (c_parser_cilk_simd_fn_vector_attrs): New function.
1445 (c_finish_cilk_simd_fn_tokens): Likewise.
1446 (is_cilkplus_vector_p): Likewise.
1447 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1448 "nomask," and "mask" strings in clause name.
1449 (c_parser_omp_all_clauses): Added 3 new case statements:
1450 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1451 PRAGMA_CILK_CLAUSE_NOMASK.
1452 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1453 check for vector attribute and if so call the function
1454 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1455 called the function c_finish_cilk_simd_fn_tokens.
1456 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1457 parser field is non-empty. If so, parse them as you would parse
1458 the omp declare simd pragma.
1459 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1460 Added a check when step is a parameter and flag it as error.
1461 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1462 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1463 pragma_omp_clause.
1464
cef0fd0e
TS
14652013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1466
1467 * c-parser.c (c_parser_omp_parallel): Fix description.
1468
12893402
BI
14692013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1470
1471 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1472 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1473 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1474 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1475
296674db
JM
14762013-12-04 Joseph Myers <joseph@codesourcery.com>
1477
1478 PR c/52023
1479 * c-parser.c (c_parser_alignas_specifier): Use
1480 c_sizeof_or_alignof_type instead of c_alignof.
1481 (c_parser_alignof_expression): Likewise, with min_alignof
1482 parameter depending on alignof spelling used.
1483
edd28054
MP
14842013-12-04 Marek Polacek <polacek@redhat.com>
1485
1486 PR c/54113
1487 * c-decl.c (start_function): Don't warn for missing prototype for
1488 inline functions.
1489
da0fc454
MP
14902013-12-03 Marek Polacek <polacek@redhat.com>
1491
1492 PR c/59351
1493 * c-decl.c (build_compound_literal): Allow compound literals with
1494 empty initial value.
1495
4c2ecab0
JM
14962013-12-02 Joseph Myers <joseph@codesourcery.com>
1497
1498 PR c/58235
1499 * c-typeck.c (build_modify_expr): Diagnose assignment to
1500 expression with array type.
1501
340baef7
JM
15022013-11-29 Joseph Myers <joseph@codesourcery.com>
1503
1504 PR c/42262
1505 * c-typeck.c (process_init_element): Do not treat a string as
1506 initializing a whole array when used with a designator for an
1507 individual element.
1508
6763b9f7
JM
15092013-11-29 Joseph Myers <joseph@codesourcery.com>
1510
1511 PR c/57574
1512 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1513 an inline function following a static declaration.
1514
e7bd1de1
JJ
15152013-11-28 Jakub Jelinek <jakub@redhat.com>
1516
1517 PR c/59310
1518 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1519 to p_name before calling c_parser_omp_teams instead of after.
1520 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1521 argument. Remove unused p_name variable.
1522
0136f8f0
AH
15232013-11-27 Aldy Hernandez <aldyh@redhat.com>
1524 Jakub Jelinek <jakub@redhat.com>
1525
1526 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1527 external_scope is NULL.
1528
241b71bb
TV
15292013-11-27 Tom de Vries <tom@codesourcery.com>
1530 Marc Glisse <marc.glisse@inria.fr>
1531
1532 PR c++/59032
1533 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1534
2fb9a547
AM
15352013-11-22 Andrew MacLeod <amacleod@redhat.com>
1536
1537 * c-typeck.c: Add required include files from gimple.h.
1538
8400e75e
DM
15392013-11-22 David Malcolm <dmalcolm@redhat.com>
1540
1541 * c-decl.c (define_label, shadow_tag_warned)
1542 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1543 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1544 (declspecs_add_type): Remove use of in_system_header macro.
1545 * c-parser.c (c_parser_unary_expression): Likewise.
1546 * c-typeck.c (store_init_value, process_init_element)
1547 (c_start_case): Likewise.
1548
1549 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1550 macro.
1551
1552 * c-parser.c (c_parser_set_source_position_from_token): Remove
1553 reference to in_system_header from comment.
1554
386b1f1f
RS
15552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1556
1557 * c-decl.c (grokdeclarator): Update comment to refer to
1558 tree_to_[su]hwi rather than tree_low_cst.
1559
ae7e9ddd
RS
15602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1561
1562 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1563 tree_to_uhwi throughout.
1564
9439e9a1
RS
15652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1566
1567 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1568 throughout.
1569
9541ffee
RS
15702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1571
1572 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1573 throughout.
1574
c02065fc
AH
15752013-11-15 Aldy Hernandez <aldyh@redhat.com>
1576
1577 * c-parser.c (c_parser_cilk_simd): New.
1578 (c_parser_cilk_verify_simd): New.
1579 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1580 (c_parser_omp_for_loop): Add case for NE_EXPR.
1581 Set c_break_label for CILK_SIMD.
1582 (c_parser_cilk_clause_vectorlength): New.
1583 (c_parser_cilk_clause_linear): New.
1584 (c_parser_cilk_clause_name): New.
1585 (c_parser_cilk_all_clauses): New.
1586 * c-typeck.c (build_unary_op): Pass location argument to
1587 readonly_error.
1588 (build_modify_expr): Same.
1589 (build_asm_expr): Same.
1590 (c_finish_bc_stmt): Error on break/continue in loops.
1591
18f429e2
AM
15922013-11-14 Andrew MacLeod <amacleod@redhat.com>
1593
1594 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1595
d8a2d370
DN
15962013-11-14 Diego Novillo <dnovillo@google.com>
1597
1598 * c-decl.c: Include print-tree.h.
1599 Include stor-layout.h.
1600 Include varasm.h.
1601 Include attribs.h.
1602 Include stringpool.h.
1603 * c-lang.c: Include fold-const.h.
1604 * c-parser.c: Include stringpool.h.
1605 Include attribs.h.
1606 Include stor-layout.h.
1607 Include varasm.h.
1608 Include trans-mem.h.
1609 * c-typeck.c: Include stor-layout.h.
1610 Include trans-mem.h.
1611 Include varasm.h.
1612 Include stmt.h.
1613
38b7bc7f
JM
16142013-11-13 Joseph Myers <joseph@codesourcery.com>
1615
1616 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1617 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1618 __auto_type.
1619 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1620 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1621 RID_AUTO_TYPE.
1622 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1623 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1624 (c_parser_declarator, c_parser_direct_declarator_inner)
1625 (c_parser_parameter_declaration, c_parser_type_name): All callers
1626 changed.
1627 (c_parser_declaration_or_fndef): Handle declarations with type
1628 determined from the initializer.
1629
45b0be94
AM
16302013-11-12 Andrew MacLeod <amacleod@redhat.com>
1631
18f429e2 1632 * c-typeck.c: Include gimplify.h.
45b0be94 1633
582d9b50
JM
16342013-11-12 Joseph Myers <joseph@codesourcery.com>
1635
1636 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1637 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1638 comment.
1639 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1640 or _Thread_local as appropriate in diagnostics.
1641 (build_null_declspecs): Initialize ret->thread_gnu_p.
1642 (declspecs_add_scspec): Handle either __thread or _Thread_local
1643 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1644 pedantic. Do not disallow _Thread_local extern and _Thread_local
1645 static.
1646
267bac10
JM
16472013-11-07 Joseph Myers <joseph@codesourcery.com>
1648 Andrew MacLeod <amacleod@redhat.com>
1649
1650 * c-aux-info.c (gen_type): Handle atomic qualifier.
1651 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1652 qualifiers when compating types.
1653 (shadow_tag_warned): Handle atomic_p in declspecs.
1654 (quals_from_declspecs): Likewise.
1655 (start_decl): Use c_type_promotes_to when promoting argument
1656 types.
1657 (grokdeclarator): Handle _Atomic.
1658 (get_parm_info): Diagnose any qualifier on "void" as only
1659 parameter.
1660 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1661 comparing types. Use c_type_promotes_to when promoting argument
1662 types.
1663 (finish_function): Use c_type_promotes_to when promoting argument
1664 types.
1665 (build_null_declspecs): Handle atomic_p in declspecs.
1666 (declspecs_add_qual): Handle RID_ATOMIC.
1667 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1668 (c_token_starts_declspecs): Handle RID_ATOMIC.
1669 (c_parser_declspecs): Handle atomic type specifiers and
1670 qualifiers.
1671 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1672 from types of expressions with atomic type.
1673 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1674 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1675 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1676 (c_parser_statement_after_labels, c_parser_switch_statement)
1677 (c_parser_for_statement, c_parser_expr_no_commas)
1678 (c_parser_conditional_expression, c_parser_binary_expression)
1679 (c_parser_cast_expression, c_parser_unary_expression)
1680 (c_parser_postfix_expression)
1681 (c_parser_postfix_expression_after_primary, c_parser_expression):
1682 Use convert_lvalue_to_rvalue.
1683 (c_parser_expression_conv, c_parser_expr_list): Document
1684 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1685 (c_parser_objc_synchronized_statement): Use
1686 convert_lvalue_to_rvalue.
1687 (c_parser_objc_selector): Handle RID_ATOMIC.
1688 (c_parser_objc_receiver, c_parser_array_notation): Use
1689 convert_lvalue_to_rvalue.
1690 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1691 _Atomic (type-name).
1692 (struct c_declspecs): Add atomic_p field.
1693 (convert_lvalue_to_rvalue): Declare.
1694 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1695 corresponding atomic types.
1696 (qualify_type): Don't add _Atomic qualifiers from second argument.
1697 (comp_target_types): Do not allow _Atomic mismatches.
1698 (type_lists_compatible_p): Do not remove atomic qualifiers when
1699 comparing types.
1700 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1701 (build_atomic_assign): New functions.
1702 (build_unary_op): Use build_atomic_assign for atomic increment and
1703 decrement.
1704 (build_conditional_expr): Do not treat _Atomic void as a qualified
1705 version of void.
1706 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1707 (find_anonymous_field_with_type, convert_to_anonymous_field)
1708 (convert_for_assignment): Do not remove atomic qualifiers when
1709 comparing types.
1710 (digest_init): Do not accept initialization of arrays of atomic
1711 elements by string constants.
1712 (build_asm_expr): Use convert_lvalue_to_rvalue.
1713 (build_binary_op): Do not treat _Atomic void as a qualified
1714 version of void.
1715
0c249d4b
DD
17162013-11-06 DJ Delorie <dj@redhat.com>
1717
1718 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1719 both explicit and builtin, print the location of the explicit one.
1720
6d7f7e0a
TB
17212013-11-05 Tobias Burnus <burnus@net-b.de>
1722
1723 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1724 c_parser_omp_distribute, c_parser_omp_teams,
1725 c_parser_omp_target, c_parser_omp_declare): Handle
1726 -fopenmp-simd.
1727
b906f4ca
MP
17282013-11-03 Marek Polacek <polacek@redhat.com>
1729
1730 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1731
ee1d5a02
JJ
17322013-11-01 Jakub Jelinek <jakub@redhat.com>
1733
1734 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1735 check_dup_generic at the end, unless remove is true.
1736 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1737 remove = true;.
1738 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1739
5a9785fb
JJ
17402013-10-31 Jakub Jelinek <jakub@redhat.com>
1741
1742 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1743 with decl that is not pointer nor array.
1744
939b37da
BI
17452013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1746
1747 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1748 a spawning function is found.
1749 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1750 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1751 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1752 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1753 case.
1754 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1755 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1756 expr.
1757 (c_finish_return): Added a check to reject _Cilk_spawn in return
1758 expression.
1759 (build_cilk_spawn): New function.
1760 (build_cilk_sync): Likewise.
1761 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1762
d4af74d4
TB
17632013-10-27 Tobias Burnus <burnus@net-b.de>
1764
1765 PR other/33426
1766 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1767 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1768 (c_parser_statement_after_labels): Update calls.
1769
d73749df 17702013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1771
1772 PR other/33426
1773 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1774 Handle PRAGMA_IVDEP.
1775 (c_parser_statement_after_labels): Update call.
1776
f28aa681
MP
17772013-10-24 Marek Polacek <polacek@redhat.com>
1778
1779 * c-parser.c (c_parser_struct_declaration): Add a comment.
1780 (c_parser_declarator): Don't allow _Alignas here.
1781
0645c1a2
AM
17822013-10-17 Andrew MacLeod <amacleod@redhat.com>
1783
1784 * c-parser.c: Include omp-low.h.
1785 * c-typeck.c: Likewise.
1786
568a31f2
MP
17872013-10-17 Marek Polacek <polacek@redhat.com>
1788
1789 PR c/58267
1790 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1791 Document syntax of the array-declarator.
1792 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1793 are not permitted.
1794 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1795 (c_parser_struct_declaration): Likewise.
1796 (c_parser_declarator): Likewise.
1797 (c_parser_direct_declarator_inner): Likewise.
1798 (c_parser_parameter_declaration): Likewise.
1799 (c_parser_type_name): Likewise.
1800
acf0174b
JJ
18012013-10-11 Jakub Jelinek <jakub@redhat.com>
1802
1803 * c-lang.h (current_omp_declare_target_attribute): New extern
1804 decl.
1805 * c-parser.c: Include c-lang.h.
1806 (struct c_parser): Change tokens to c_token *.
1807 Add tokens_buf field. Change tokens_avail type to unsigned int.
1808 (c_parser_consume_token): If parser->tokens isn't
1809 &parser->tokens_buf[0], increment parser->tokens.
1810 (c_parser_consume_pragma): Likewise.
1811 (enum pragma_context): Add pragma_struct and pragma_param.
1812 (c_parser_external_declaration): Adjust
1813 c_parser_declaration_or_fndef caller.
1814 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1815 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1816 Adjust recursive call.
1817 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1818 of pragma_external.
1819 (c_parser_parameter_declaration): Use pragma_param instead of
1820 pragma_external.
1821 (c_parser_compound_statement_nostart, c_parser_label,
1822 c_parser_for_statement): Adjust
1823 c_parser_declaration_or_fndef callers.
1824 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1825 it through to c_parser_conditional_expression.
1826 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1827 pass it through to c_parser_binary_expression. Adjust recursive
1828 call.
1829 (c_parser_binary_expression): Remove prec argument, add
1830 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1831 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1832 binop matches it, use build2 instead of parser_build_binary_op.
1833 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1834 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1835 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1836 Handle pragma_struct and pragma_param the same as pragma_external.
1837 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1838 (c_parser_omp_variable_list): Parse array sections for
1839 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1840 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1841 (c_parser_omp_clause_reduction): Handle user defined reductions.
1842 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1843 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1844 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1845 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1846 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1847 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1848 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1849 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1850 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1851 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1852 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1853 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1854 (c_parser_omp_for_loop): Add CODE argument, pass it through
1855 to c_finish_omp_for. Change last argument to cclauses,
1856 and adjust uses to grab parallel clauses from the array of all
1857 the split clauses. Adjust c_parser_binary_expression,
1858 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1859 (omp_split_clauses): New function.
1860 (c_parser_omp_simd): New function.
1861 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1862 Allow the function to be called also when parsing combined constructs,
1863 and call c_parser_omp_simd when parsing for simd.
1864 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1865 #pragma omp section, require exactly one structured-block instead of
1866 sequence of statements.
1867 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1868 Allow the function to be called also when parsing combined constructs.
1869 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1870 Allow the function to be called also when parsing combined
1871 constructs.
1872 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1873 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1874 c_parser_omp_teams, c_parser_omp_target_data,
1875 c_parser_omp_target_update, c_parser_omp_target,
1876 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1877 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1878 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1879 (c_parser_omp_construct): Add p_name and mask vars. Handle
1880 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1881 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1882 and c_parser_omp_sections callers.
1883 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1884 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1885 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1886 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1887 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1888 OMP_CLAUSE_DEPEND.
1889 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1890 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1891 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1892 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1893 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1894 * c-typeck.c: Include tree-inline.h.
1895 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1896 handle_omp_array_sections_1, handle_omp_array_sections,
1897 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1898 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1899 user defined reductions.
1900 (c_tree_equal): New function.
1901 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1902 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1903 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1904 c_check_omp_declare_reduction_r): New prototypes.
1905 * c-decl.c (current_omp_declare_target_attribute): New variable.
1906 (c_decl_attributes): New function.
1907 (start_decl, start_function): Use it instead of decl_attributes.
1908 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1909 c_omp_reduction_decl, c_omp_reduction_lookup,
1910 c_check_omp_declare_reduction_r): New functions.
1911
0a6c2227
TT
19122013-09-25 Tom Tromey <tromey@redhat.com>
1913
1914 * Make-lang.in (c/gccspec.o): Remove.
1915 (CFLAGS-c/gccspec.o): New variable.
1916 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1917 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1918 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1919
f3bc55f0
TT
19202013-09-25 Tom Tromey <tromey@redhat.com>
1921
1922 * Make-lang.in (c/gccspec.o): Don't use subshell.
1923
a24d975c
MP
19242013-09-18 Marek Polacek <polacek@redhat.com>
1925
1926 PR sanitize/58443
1927 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1928 Remove unnecessary check.
1929
ce6923c5
MP
19302013-09-18 Marek Polacek <polacek@redhat.com>
1931
1932 PR sanitizer/58411
1933 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1934 no_sanitize_undefined attribute.
1935
a1e51df9
KT
19362013-09-13 Kai Tietz <ktietz@redhat.com>
1937
1938 PR target/57848
1939 * c-decl.c (c_builtin_function_ext_scope): Remove
1940 wrong assumption that it is never called on prexisting
1941 symbol.
1942
0af94e6f
JR
19432013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1944
1945 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1946
20059c8b
GDR
19472013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1948
1949 * c-objc-common.c (c_tree_printer): Tidy.
1950
de5a5fa1
MP
19512013-08-30 Marek Polacek <polacek@redhat.com>
1952
1953 * c-typeck.c (build_binary_op): Add division by zero and shift
1954 instrumentation.
1955
2531a1d9 19562013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1957 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1958
6e2bcc98 1959 PR c/35649
2531a1d9
JR
1960 * c-typeck.c (c_common_type): Prefer double_type_node over
1961 other REAL_TYPE types with the same precision.
1962 (convert_arguments): Likewise.
1963
025311c4
GDR
19642013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1965
1966 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1967 (c_initialize_diagnostics): Call a destructor for the early printer.
1968
da6ca2b5
GDR
19692013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1970
1971 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1972 printer initialization.
1973
318cda85 19742013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1975
318cda85
BI
1976 PR c/57490
1977 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1978 check for truth values.
1979 (expand_array_notation_exprs): Added truth values case. Removed an
1980 unwanted else. Added for-loop to walk through subtrees in default
1981 case.
1982
b066401f
GDR
19832013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1984
1985 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1986
fb48aadc
JM
19872013-07-23 Joseph Myers <joseph@codesourcery.com>
1988
1989 * c-parser.c (struct c_generic_association): Fix typo.
1990
433cc7b0
TT
19912013-07-23 Tom Tromey <tromey@redhat.com>
1992 Joseph Myers <joseph@codesourcery.com>
1993
1994 * c-parser.c (struct c_generic_association): New.
1995 (c_generic_association_d): New typedef.
1996 (c_parser_generic_selection): New function.
1997 (c_parser_postfix_expression): Handle RID_GENERIC.
1998
26d40c3d
JM
19992013-07-13 Jason Merrill <jason@redhat.com>
2000
2001 PR c++/57793
2002 * c-decl.c (finish_struct): Check for too-large class.
2003
ecdbd01a 20042013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2005
2006 PR c/57821
2007 * c-typeck.c (set_init_index): When folding, check for index overflow.
2008
1141ed3f
BI
20092013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2010
2011 * c-parser.c (c_parser_array_notation): Removed rejection of array
2012 notations in an array of function pointers.
2013
713b46fa
BI
20142013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2015
2016 * c-array-notation.c (make_triplet_val_inv): New function.
2017 (create_cmp_incr): Likewise.
2018 (create_array_refs): Likewise.
2019 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2020 Also modularized common parts between functions and called the function.
2021 (build_array_notation_expr): Likewise.
2022 (fix_conditional_array_notations_1): Likewise.
2023 (fix_array_notation_expr): Likewise.
2024 (fix_array_notation_call_expr): Likewise.
2025
92f20202
MP
20262013-06-18 Marek Polacek <polacek@redhat.com>
2027
2028 PR c/57630
2029 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2030
73a23b06
BI
20312013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2032
2033 * c-array-notation.c (build_array_notation_expr): Reject array notation
2034 mismatch between LHS and RHS even inside a call_expr. Also, removed
2035 a couple while statements that were dead code.
2036
00b8517d
BI
20372013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2038
2039 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2040 excessive precision expressions in function parameters. Also removed
2041 couple unwanted while statements.
2042
1509bdda
BI
20432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2044
2045 * c-array-notation.c (expand_array_notation_exprs): Added
2046 ARRAY_NOTATION_REF case.
2047
d60f1706
BI
20482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2049
2050 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2051 function to c-family/array-notation-common.c.
2052 (is_cilkplus_reduce_builtin): Likewise.
2053 (find_rank): Likewise.
2054 (extract_array_notation_exprs): Likewise.
2055 (replace_array_notations): Likewise.
2056 (find_inv_trees): Likewise.
2057 (replace_inv_trees): Likewise.
2058 (contains_array_notation_expr): Likewise.
2059 (find_correct_array_notation_type): Likewise.
2060 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2061 (struct inv_list): Moved this to c-family/array-notation-common.c.
2062 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2063
6d6efbb3
BI
20642013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2065
2066 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2067 reduction functions outside the for-loop. Added a check if the fundecl
2068 is non-NULL. Finally, removed an unwanted if-statement, and made the
2069 body unconditional.
2070
25c22937
BI
20712013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2072
2073 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2074 condition of the if-statement matches the rank of else-block and then-
2075 block when array notations are used.
2076 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2077 expression after the entire function body is parsed.
2078 (c_parser_expr_no_commas): Delayed creating array notation expressions
2079 to the end of function parsing.
2080 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2081 whole if-statement instead of just the condition.
2082 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2083
edd25645
BI
20842013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2085
2086 PR c/57474
2087 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2088 array to NULL_TREE if they are unused. Also added a check for the
2089 field to be NULL before its fields are used in future.
2090
065ce7f1
RO
20912013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2092
2093 PR bootstrap/57450
2094 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2095 (build_array_notation_expr): Likewise.
2096
36536d79
BI
20972013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2098
2099 * c-typeck.c (build_array_ref): Added a check to see if array's
2100 index is greater than one. If true, then emit an error.
2101 (build_function_call_vec): Exclude error reporting and checking
2102 for builtin array-notation functions.
2103 (convert_arguments): Likewise.
2104 (c_finish_return): Added a check for array notations as a return
2105 expression. If true, then emit an error.
2106 (c_finish_loop): Added a check for array notations in a loop
2107 condition. If true then emit an error.
2108 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2109 (build_binary_op): Added a check for array notation expr inside
2110 op1 and op0. If present, we call another function to find correct
2111 type.
2112 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2113 * c-parser.c (c_parser_compound_statement): Check if array
2114 notation code is used in tree, if so, then transform them into
2115 appropriate C code.
2116 (c_parser_expr_no_commas): Check if array notation is used in LHS
2117 or RHS, if so, then build array notation expression instead of
2118 regular modify.
2119 (c_parser_postfix_expression_after_primary): Added a check for
2120 colon(s) after square braces, if so then handle it like an array
2121 notation. Also, break up array notations in unary op if found.
2122 (c_parser_direct_declarator_inner): Added a check for array
2123 notation.
2124 (c_parser_compound_statement): Added a check for array notation in
2125 a stmt. If one is present, then expand array notation expr.
2126 (c_parser_if_statement): Likewise.
2127 (c_parser_switch_statement): Added a check for array notations in
2128 a switch statement's condition. If true, then output an error.
2129 (c_parser_while_statement): Similarly, but for a while.
2130 (c_parser_do_statement): Similarly, but for a do-while.
2131 (c_parser_for_statement): Similarly, but for a for-loop.
2132 (c_parser_unary_expression): Check if array notation is used in a
2133 pre-increment or pre-decrement expression. If true, then expand
2134 them.
2135 (c_parser_array_notation): New function.
2136 * c-array-notation.c: New file.
2137 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2138
cd192ccc
MS
21392013-05-23 Mike Stump <mikestump@comcast.net>
2140
2141 * c-typeck.c (convert_for_assignment): Handle references to memory
2142 spaces better.
2143
427b248d
JM
21442013-05-16 Jason Merrill <jason@redhat.com>
2145
2146 * Make-lang.in (cc1$(exeext)): Use link mutex.
2147
44d90fe1
PC
21482013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2149
2150 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2151 to simply use OPT_Wpointer_arith.
2152 (build_unary_op): Likewise.
2153
4e7d7b3d
JJ
21542013-04-03 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c/19449
2157 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2158 argument. If set, or it temporarily for parsing of the first
2159 argument into force_folding_builtin_constant_p.
2160 (c_parser_postfix_expression): Adjust callers.
2161
839b422f
RB
21622013-03-21 Richard Biener <rguenther@suse.de>
2163
2164 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2165 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2166
2ee028f1
MP
21672013-02-12 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/44938
2170 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2171 origtypes to NULL.
2172
8824edff
JJ
21732013-01-24 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR c/56078
2176 * c-typeck.c (set_nonincremental_init_from_string): If
2177 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2178 returned false.
2179 (process_init_element): Likewise.
2180
eadd3d0d
JJ
21812012-12-20 Jakub Jelinek <jakub@redhat.com>
2182
2183 PR c++/55619
2184 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2185 argument, don't call default_function_array_conversion
2186 nor c_fully_fold here.
2187 (c_parser_asm_statement): Adjust callers.
2188 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2189 and outputs here, and call default_function_array_conversion
2190 on inputs that don't need to be addressable.
2191
f8a93a2e
JJ
21922012-12-18 Jakub Jelinek <jakub@redhat.com>
2193
2194 PR c/39464
2195 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2196 warning require that both c_common_unsigned_type as well as
2197 c_common_signed_type is the same for both mvl and mvr types.
2198
9771b263
DN
21992012-11-16 Diego Novillo <dnovillo@google.com>
2200
2201 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2202
2203 * c-common.c: Use new vec API in vec.h.
2204 * c-common.h: Likewise.
2205 * c-gimplify.c: Likewise.
2206 * c-pragma.c: Likewise.
2207 * c-pretty-print.c: Likewise.
2208 * c-pretty-print.h: Likewise.
2209 * c-semantics.c: Likewise.
2210 * c-decl.c: Likewise.
2211 * c-parser.c: Likewise.
2212 * c-tree.h: Likewise.
2213 * c-typeck.c: Likewise.
2214
880661a4
JW
22152012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2216
2217 PR c++/54930
2218 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2219
077d1abe
MLI
22202012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2221
2222 PR c/53066
2223 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2224 shadows a function, unless the variable is a function or a
2225 pointer-to-function.
2226
3a785c97
JJ
22272012-10-12 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR c/54381
2230 * c-parser.c (struct c_tree_loc_pair): Removed.
2231 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2232 add location_t * and tree * arguments, fill in array of 3
2233 sizeof_arg trees and corresponding locs.
2234 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2235 c_parser_expr_list callers.
2236 (c_parser_postfix_expression_after_primary): Likewise. Pass
2237 array of 3 sizeof_arg trees and locs (corresponding to first
2238 3 arguments) to sizeof_pointer_memaccess_warning.
2239
703c8606
LC
22402012-10-09 Lawrence Crowl <crowl@google.com>
2241
2242 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2243 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2244 hash table.
2245
5d9de0d0
PC
22462012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2247
2248 PR c++/54194
2249 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2250 call.
2251
a212e43f
MG
22522012-10-09 Marc Glisse <marc.glisse@inria.fr>
2253
2254 PR c++/54427
2255 * c-typeck.c: Include c-common.h.
2256 (enum stv_conv): Moved to c-common.h.
2257 (scalar_to_vector): Moved to c-common.c.
2258 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2259 * Make-lang.in: c-typeck.c depends on c-common.h.
2260
3b78de56
AC
22612012-10-04 Arnaud Charlet <charlet@adacore.com>
2262
2263 * c-decl.c (c_write_global_declarations): Fix handling of
2264 -fdump-ada-spec*.
2265
78c60e3d
SS
22662012-09-30 Sharad Singhai <singhai@google.com>
2267
2268 * c-decl.c (c_write_global_declarations): Use a different method
2269 to determine if the dump has ben initialized.
2270
9f33203d
JM
22712012-09-14 Joseph Myers <joseph@codesourcery.com>
2272
2273 PR c/54552
2274 * c-typeck.c (c_cast_expr): When casting to a type requiring
2275 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2276 c_fully_fold first.
2277
a27d595d
JM
22782012-09-14 Joseph Myers <joseph@codesourcery.com>
2279
2280 PR c/54103
2281 * c-typeck.c (build_unary_op): Pass original argument of
2282 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2283 any C_MAYBE_CONST_EXPR, if it has integer operands.
2284 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2285 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2286 to c_objc_common_truthvalue_conversion, then remove any
2287 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2288 c_objc_common_truthvalue_conversion not
2289 c_common_truthvalue_conversion.
2290 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2291 call note_integer_operands for arguments with integer operands
2292 that are not integer constants.
2293
9feb29df
JJ
22942012-09-13 Jakub Jelinek <jakub@redhat.com>
2295
2296 PR c/54559
2297 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2298 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2299
d409320c
JJ
23002012-08-31 Jakub Jelinek <jakub@redhat.com>
2301
2302 PR c/54428
2303 * c-convert.c (convert): Don't call fold_convert_loc if
2304 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2305 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2306 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2307
6265d07c
JJ
23082012-08-24 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/54355
2311 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2312 for nested and empty_ok arguments in the call to
2313 c_parser_declaration_or_fndef.
2314
1a4049e7
JJ
23152012-08-17 Jakub Jelinek <jakub@redhat.com>
2316
2317 * c-tree.h (c_last_sizeof_arg): Declare.
2318 * c-parser.c (struct c_tree_loc_pair): New type.
2319 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2320 non-NULL.
2321 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2322 (c_parser_postfix_expression_after_primary): Likewise. Call
2323 sizeof_pointer_memaccess_warning if needed.
2324 (sizeof_ptr_memacc_comptypes): New function.
2325 * c-typeck.c (c_last_sizeof_arg): New global variable.
2326 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2327
0229aee9
UB
23282012-07-24 Uros Bizjak <ubizjak@gmail.com>
2329
2330 * c-lang.h (lang_decl): Add variable_size GTY option.
2331
7ee2468b
SB
23322012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2333
2334 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2335 * Make-lang.in: Fix dependencies.
2336
d4a10d0a
SB
23372012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2338
2339 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2340 and add language Makefile hooks.
2341 * config-lang.in: New file.
2342 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2343 add the required "normal" config-lang.in rules.
2344 * c-lang.h: Moved from gcc/ to here.
2345 * c-tree.h: Likewise.
2346 * c-objc-common.c: Likewise.
2347 * c-objc-common.h: Likewise.
2348 * c-typeck.c: Likewise.
2349 * c-convert.c: Likewise.
2350 * c-lang.c: Likewise.
2351 * c-aux-info.c: Likewise.
2352 * c-errors.c: Likewise.
2353 * gccspec.c: Likewise.
2354 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2355 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2356\f
5624e564 2357Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2358
2359Copying and distribution of this file, with or without modification,
2360are permitted in any medium without royalty provided the copyright
2361notice and this notice are preserved.
This page took 0.940846 seconds and 5 git commands to generate.