]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR lto/65378 (Tweak to wording of -Wodr message)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d7438551
AH
12015-06-05 Aldy Hernandez <aldyh@redhat.com>
2
3 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4 immediately clobber it.
5 (c_write_global_declarations_1): Remove call to
6 check_global_declaration_1.
7 (c_write_global_declarations_2): Remove.
8 (c_write_final_cleanups): Rename from c_write_global_declarations.
9 Remove call to finalize_compilation_unit.
10 Remove calls to debugging hooks.
11 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
12 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
13 * c-tree.h: Remove c_write_global_declarations.
14
ecb9f223
AM
152015-06-04 Andrew MacLeod <amacleod@redhat.com>
16
17 * c-array-notation.c: Adjust includes for restructured coretypes.h.
18 * c-aux-info.c: Likewise.
19 * c-convert.c: Likewise.
20 * c-decl.c: Likewise.
21 * c-errors.c: Likewise.
22 * c-lang.c: Likewise.
23 * c-objc-common.c: Likewise.
24 * c-parser.c: Likewise.
25 * c-typeck.c: Likewise.
26
9482b620
MP
272015-06-04 Marek Polacek <polacek@redhat.com>
28
29 PR c/66341
30 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
31 it is a lvalue.
32
bc51ace3
PK
332015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
34
35 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
36 Warn for empty struct.
37 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
38
ea5b45b6
AT
392015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
40
41 * c-decl.c (start_function): Call plugin before parsing.
42 (finish_function): Call plugin after parsing.
43
c2d47482
PK
442015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
45
46 PR c/49551
47 * c-decl.c (merge_decls): Merge DECL_COMMON.
48
a95492ab
JW
492015-05-22 Jim Wilson <jim.wilson@linaro.org>
50
51 * Make-lang.in (check_gcc_pallelize): Define.
52
fd5c817a
MP
532015-05-22 Marek Polacek <polacek@redhat.com>
54
55 PR c/47043
56 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
57 attributes.
58
c7b70a3c
MP
592015-05-21 Marek Polacek <polacek@redhat.com>
60
61 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
62 DECL_BUILT_IN.
63
21b634ae
MP
642015-05-20 Marek Polacek <polacek@redhat.com>
65
66 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
67 * c-typeck.c: Likewise.
68
296a8c2f
MP
692015-05-19 Marek Polacek <polacek@redhat.com>
70
71 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
72
41b37d5e
JJ
732015-05-19 Jakub Jelinek <jakub@redhat.com>
74
75 PR middle-end/66199
76 * c-parser.c (c_parser_omp_for_loop): Don't add
77 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
78 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
79 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
80 constructs.
81
fab27f52
MM
822015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
83
84 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 85 swaps.
fab27f52 86
40de31cf
MLI
872015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
88
89 PR fortran/44054
90 * c-objc-common.c (c_tree_printer): Replace locus pointer with
91 accessor function.
92
3aa3c9fc
MP
932015-05-14 Marek Polacek <polacek@redhat.com>
94
95 PR c/66066
96 PR c/66127
97 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
98 rather than with 0.
99
c3388e62
DM
1002015-05-12 David Malcolm <dmalcolm@redhat.com>
101
102 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
103 to add a call to warn_for_misleading_indentation.
104 (c_parser_else_body): Likewise, adding param "else_loc".
105 (c_parser_if_statement): Check for misleading indentation.
106 (c_parser_while_statement): Likewise.
107 (c_parser_for_statement): Likewise.
108
755e528f
MP
1092015-05-08 Marek Polacek <polacek@redhat.com>
110
111 PR c/64918
112 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
113 (output_init_element): Likewise.
114
0173bd2a
MP
1152015-05-07 Marek Polacek <polacek@redhat.com>
116
117 PR c/65179
118 * c-typeck.c (build_binary_op): Warn when left shifting a negative
119 value.
120
9babc352
MP
1212015-04-30 Marek Polacek <polacek@redhat.com>
122
123 * c-typeck.c (set_init_label): Call error_at instead of error and
124 pass LOC to it.
125
ac9f18db
MP
126 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
127 the type of a decl.
128
ec3fba51
MP
129 * c-typeck.c (c_build_va_arg): Clarify the error message.
130
b811915d
TS
1312015-04-29 Thomas Schwinge <thomas@codesourcery.com>
132
133 * c-parser.c (c_parser_oacc_enter_exit_data): Use
134 OMP_STANDALONE_CLAUSES.
135
f3075008
MP
1362015-04-28 Marek Polacek <polacek@redhat.com>
137
138 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
139
4e81b788
MP
1402015-04-28 Marek Polacek <polacek@redhat.com>
141
142 PR c/65901
143 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
144
6c1db78e
MP
1452015-04-25 Marek Polacek <polacek@redhat.com>
146
147 PR c/52085
148 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
149 attribute.
150
5c4abbb8
MP
1512015-04-23 Marek Polacek <polacek@redhat.com>
152
153 PR c/65345
154 * c-decl.c (set_labels_context_r): New function.
155 (store_parm_decls): Call it via walk_tree_without_duplicates.
156 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
157 instead of create_tmp_var. Build TARGET_EXPR instead of
158 COMPOUND_EXPR.
159 (build_atomic_assign): Use create_tmp_var_raw instead of
160 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
161
06aca1d5
IV
1622015-04-20 Ilya Verbin <ilya.verbin@intel.com>
163
164 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
165 (c_parser_omp_target_update): Add missed %> to error_at ().
166
8fba1830
BRF
1672015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
168
169 PR target/55143
170 * c-decl.c (c_default_pointer_mode): Remove definition.
171 * c-tree.h (c_default_pointer_mode): Remove declaration.
172
62021f64
TB
1732015-03-27 Tobias Burnus <burnus@net-b.de>
174
175 PR c/65586
176 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
177 error out.
178 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
179 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
180 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
181
9b65e171
JJ
1822015-03-19 Jakub Jelinek <jakub@redhat.com>
183
184 * c-decl.c (c_decl_attributes): Also add "omp declare target"
185 attribute for DECL_EXTERNAL VAR_DECLs.
186
17958621
JJ
1872015-03-11 Jakub Jelinek <jakub@redhat.com>
188
189 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
190 argument.
191
7ccb1a11
JJ
1922015-03-10 Jakub Jelinek <jakub@redhat.com>
193
194 PR c/65120
195 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
196 before preparing arguments to warn_logical_not_parentheses.
197
01177669
JJ
1982015-03-09 Jakub Jelinek <jakub@redhat.com>
199
200 PR c/65120
201 * c-typeck.c (parser_build_binary_op): Don't warn for
202 !!x == y or !b == y where b is _Bool.
203
802ac282
MP
2042015-03-09 Marek Polacek <polacek@redhat.com>
205
206 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
207 * c-decl.c (grokdeclarator): Likewise.
208 * c-typeck.c (build_binary_op): Likewise.
209
e5165b60
MP
2102015-02-27 Marek Polacek <polacek@redhat.com>
211
212 PR c/65228
213 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
214
065d214c
MP
2152015-02-14 Marek Polacek <polacek@redhat.com>
216
217 PR c/64768
218 * c-decl.c (grokdeclarator): Set the range of a flexible array member
219 declared through a typedef name.
220
e5d9235b
MP
2212015-02-13 Marek Polacek <polacek@redhat.com>
222
223 PR c/65050
224 * c-decl.c (grokdeclarator): Print also the type when giving
225 the error message about array's incomplete element type.
226
fa01ffcc
JJ
2272015-02-11 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/64824
230 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
231 check in the POP macro.
232
c3e38a03
MP
2332015-02-09 Marek Polacek <polacek@redhat.com>
234
235 PR c/64856
236 * c-typeck.c (process_init_element): Don't always wrap
237 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
238 initializing a range of elements.
239
4886ec8e
JJ
2402015-02-04 Jakub Jelinek <jakub@redhat.com>
241
242 PR c/64824
243 PR c/64868
244 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
245
c3e38a03 2462015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
247
248 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
249 processing enum declaration.
250
7b33f0c8
MP
2512015-01-29 Marek Polacek <polacek@redhat.com>
252
253 PR c/64709
254 * c-typeck.c (pop_init_level): If constructor_elements has
255 exactly one element with integer_zerop value, set constructor_zeroinit
256 to 1. Remove braces around warning_init call.
257
dea63e49
JJ
2582015-01-27 Jakub Jelinek <jakub@redhat.com>
259
260 PR c/64766
261 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
262 of FUNCTION_DECLs with error_mark_node.
263
d38f7dce
JJ
2642015-01-26 Jakub Jelinek <jakub@redhat.com>
265
266 PR c/64778
267 * c-typeck.c (convert_arguments): Return -1 if there are
268 error_args, even if we've diagnosed too many arguments.
269
cbf5d0e7
RB
2702015-01-21 Richard Biener <rguenther@suse.de>
271
272 PR middle-end/64313
273 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
274 for builtins the user declared correctly.
275
41dbbb37
TS
2762015-01-15 Thomas Schwinge <thomas@codesourcery.com>
277 Bernd Schmidt <bernds@codesourcery.com>
278 Cesar Philippidis <cesar@codesourcery.com>
279 James Norris <jnorris@codesourcery.com>
280 Jakub Jelinek <jakub@redhat.com>
281 Ilmir Usmanov <i.usmanov@samsung.com>
282
283 * c-parser.c: Include "gomp-constants.h".
284 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
285 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
286 Use OMP_CLAUSE_SET_MAP_KIND.
287 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
288 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
289 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
290 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
291 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
292 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
293 "copyout", "create", "delete", "deviceptr", "gang", "host",
294 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
295 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
296 "present_or_create", "pcreate", "seq", "self", "vector",
297 "vector_length", "wait", "worker".
298 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
299 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
300 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
301 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
302 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
303 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
304 (c_parser_oacc_data_clause_deviceptr)
305 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
306 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
307 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
308 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
309 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
310 (c_parser_oacc_parallel, c_parser_oacc_update)
311 (c_parser_oacc_wait): New functions.
312 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
313 (c_finish_oacc_data): New prototypes.
314 * c-typeck.c: Include "gomp-constants.h".
315 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
316 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
317 OMP_CLAUSE_SET_MAP_KIND.
318 (c_finish_oacc_parallel, c_finish_oacc_kernels)
319 (c_finish_oacc_data): New functions.
320 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
321 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
322 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
323 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
324 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
325 GOMP_MAP_FORCE_DEVICEPTR.
326
adfac8df
JJ
3272015-01-09 Michael Collison <michael.collison@linaro.org>
328
329 * c-array-notation.c: Include hash-set.h, machmode.h,
330 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
331 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
332 * c-aux-info.c: Ditto.
333 * c-convert.c: Ditto.
334 * c-decl.c: Ditto.
335 * c-errors.c: Ditto.
336 * c-lang.c: Dittoxs.
337 * c-objc-common.c: Ditto.
338 * c-parser.c: Ditto.
339 * c-typeck.c: Include hash-set.h, machmode.h,
340 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
341 fold-const.h, wide-int.h, inchash.h, real.h and
342 fixed-value.h due to flattening of tree.h.
343
2cc901dc
MP
3442015-01-07 Marek Polacek <polacek@redhat.com>
345
346 PR c/64417
347 * c-typeck.c (process_init_element): Disallow initialization of
348 a flexible array member with a string constant if the structure
349 is in an array.
350
5624e564
JJ
3512015-01-05 Jakub Jelinek <jakub@redhat.com>
352
e5341100
JJ
353 PR sanitizer/64344
354 * c-typeck.c (convert_for_assignment, c_finish_return): For
355 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
356 types also set in_late_binary_op around convert call.
357 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
358 to integral type casts, if not in_late_binary_op, pass c_fully_fold
359 result on expr as last argument to ubsan_instrument_float_cast,
360 if in_late_binary_op, don't use c_save_expr but save_expr.
361
5624e564
JJ
362 Update copyright years.
363
5bd012f8
MP
3642015-01-05 Marek Polacek <polacek@redhat.com>
365
366 PR c/64423
367 * c-typeck.c (build_array_ref): Pass loc down to
368 warn_array_subscript_with_type_char.
369
768952be
MU
3702014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
371
372 * c-typeck.c: New behavious for pointers to arrays with qualifiers
373 (common-pointer-type): For pointers to arrays take qualifiers from
374 element type.
375 (build_conditional_expr): Add warnings for lost qualifiers.
376 (comp-target-types): Allow pointers to arrays with different qualifiers.
377 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
378 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
379 to PEDWARN_FOR_QUALIFIERS.
380
8f94a8c4
JJ
3812014-12-17 Jakub Jelinek <jakub@redhat.com>
382
383 PR sanitizer/64289
384 * c-convert.c: Include ubsan.h.
385 (convert): For real -> integral casts and
386 -fsanitize=float-cast-overflow don't call convert_to_integer, but
387 instead instrument the float cast directly.
388
b731b390
JJ
3892014-11-29 Jakub Jelinek <jakub@redhat.com>
390
391 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
392 c_finish_stmt_expr): Remove NULL last argument from
393 create_tmp_var_raw and create_tmp_var calls.
394 * c-array-notation.c (fix_builtin_array_notation_fn,
395 build_array_notation_expr, fix_conditional_array_notations_1,
396 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
397
541e35a6
MP
3982014-11-28 Marek Polacek <polacek@redhat.com>
399
400 PR c/63862
401 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
402 convert the right operand to integer type.
403
b286be94
MP
4042014-11-25 Marek Polacek <polacek@redhat.com>
405
406 PR c/63877
407 * c-decl.c (start_function): Disable -Wmissing-declarations warning
408 for inline functions.
409
aa7da51a
JJ
4102014-11-21 Jakub Jelinek <jakub@redhat.com>
411
412 PR target/63764
413 * c-typeck.c (build_array_ref): Adjust
414 convert_vector_to_pointer_for_subscript caller. If it returns true,
415 call non_lvalue_loc on the result.
416
d876207f
RB
4172014-11-11 Richard Biener <rguenther@suse.de>
418
419 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
420 to true.
421
e5e44252
AK
4222014-11-10 Andi Kleen <ak@linux.intel.com>
423
424 PR c/60804
425 * c-parser.c (c_parser_statement_after_labels): Call
426 check_no_cilk.
427 (c_parser_if_statement): Dito.
428 (c_parser_switch_statement): Dito.
429 (c_parser_while_statement): Dito.
430 (c_parser_do_statement): Dito.
431 (c_parser_for_statement): Dito.
432 * c-typeck.c (c_finish_loop): Dito.
433
13c21655
PC
4342014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
435
436 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
437 OPT_Wshift_count_overflow in the warnings.
438
2d51fcef
MP
4392014-10-30 Marek Polacek <polacek@redhat.com>
440
441 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
442 print the stripped version as well, if they're not the same.
443
ef4bddc2
RS
4442014-10-29 Richard Sandiford <richard.sandiford@arm.com>
445
446 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
447 machine_mode.
448
c582198b
AM
4492014-10-28 Andrew MacLeod <amacleod@redhat.com>
450
451 * c-decl.c: Adjust include files.
452 * c-parser.c: Ditto.
453
ddc8de03
PM
4542014-10-27 Phil Muldoon <pmuldoon@redhat.com>
455 Tom Tromey <tromey@redhat.com>
456
457 * c-tree.h (enum c_oracle_request): New.
458 (c_binding_oracle_function): New typedef.
459 (c_binding_oracle, c_pushtag, c_bind): Declare.
460 * c-decl.c (c_binding_oracle): New global.
461 (I_SYMBOL_CHECKED): New macro.
462 (i_symbol_binding): New function.
463 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
464 (I_TAG_CHECKED): New macro.
465 (i_tag_binding): New function.
466 (I_TAG_BINDING, I_TAG_DECL): Redefine.
467 (I_LABEL_CHECKED): New macro.
468 (i_label_binding): New function.
469 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
470 (c_print_identifier): Save and restore c_binding_oracle.
471 (c_pushtag, c_bind): New functions.
472
60393bbc
AM
4732014-10-27 Andrew MacLeod <amacleod@redhat.com>
474
475 * c-typeck.c: Adjust include files.
476
d723bb7c
MLI
4772014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
478
479 PR c++/53061
480 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
481 initialization here...
482 (c_initialize_diagnostics): ... but here. Set defaults after
483 building pretty-printer.
484
1bc5a451
MP
4852014-10-23 Marek Polacek <polacek@redhat.com>
486
487 PR c/63626
488 * c-decl.c (pop_scope): Don't print warning in external_scope.
489
4435bb92
MP
4902014-10-19 Marek Polacek <polacek@redhat.com>
491
492 PR c/63567
493 * c-typeck.c (output_init_element): Allow initializing objects with
494 static storage duration with compound literals even in C99 and add
495 pedwarn for it.
496
7278465e
MP
4972014-10-17 Marek Polacek <polacek@redhat.com>
498
499 PR c/63567
500 * c-typeck.c (digest_init): Allow initializing objects with static
501 storage duration with compound literals even in C99 and add pedwarn
502 for it.
503
d9b7be2e
MP
5042014-10-17 Marek Polacek <polacek@redhat.com>
505
506 PR c/63543
507 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
508 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
509 error multiple times. Print the type.
510
f406ae1f
MP
5112014-10-17 Marek Polacek <polacek@redhat.com>
512
513 PR c/63549
514 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
515 type.
516
92574c7c
MP
5172014-10-17 Marek Polacek <polacek@redhat.com>
518
519 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
520 (start_function): Use OPT_Wimplicit_int instead of 0.
521 (store_parm_decls_oldstyle): Likewise.
522
1bc4a978
MT
5232014-10-17 Alan Modra <amodra@gmail.com>
524
525 PR middle-end/61848
526 * c-decl.c (merge_decls): Don't merge section name or tls model
527 to newdecl symtab node, instead merge to olddecl. Override
528 existing olddecl section name. Set tls_model for all thread-local
529 vars, not just OMP thread-private ones. Remove incorrect comment.
530
83685514
AM
5312014-10-16 Andrew MacLeod <amacleod@redhat.com>
532
533 * c-decl.c: Adjust include files.
534
78a7c317
DD
5352014-10-14 DJ Delorie <dj@redhat.com>
536
537 * c-parser.c (c_parse_init): Add RID entries for each __intN.
538 (c_token_starts_typename): Check all __intN, not just __int128.
539 (c_token_starts_declspecs): Likewise.
540 (c_parser_declspecs): Likewise.
541 (c_parser_attribute_any_word): Likewise.
542 (c_parser_objc_selector): Likewise.
543 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
544 (struct c_declspecs): Add int_n_idx field to record *which* __intN
545 is specified.
546 * c-decl.c (declspecs_add_type): Check for all __intN, not just
547 __int128.
548 (finish_declspecs): Likewise.
549
74d98c1e
AB
5502014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
551
552 * c-parser.c (c_parser_all_labels): New function to replace
553 the duplicate code.
554 (c_parser_statement): Call the new function.
555
84937de2
MP
5562014-10-09 Marek Polacek <polacek@redhat.com>
557
558 PR c/63480
559 * c-typeck.c (pop_init_level): Don't warn about initializing
560 with { }.
561
0382aaa0
MP
5622014-10-07 Marek Polacek <polacek@redhat.com>
563
564 PR c/59717
565 * c-decl.c (header_for_builtin_fn): New function.
566 (implicitly_declare): Suggest which header to include.
567
7a0ca710
MP
5682014-10-07 Marek Polacek <polacek@redhat.com>
569
570 * c-convert.c (convert): Use error_operand_p.
571 * c-typeck.c (require_complete_type): Likewise.
572 (really_atomic_lvalue): Likewise.
573 (digest_init): Likewise.
574 (handle_omp_array_sections_1): Likewise.
575
6bc8a126
MP
5762014-10-03 Marek Polacek <polacek@redhat.com>
577
578 PR c/63453
579 * c-decl.c (pop_scope): Don't warn about "inline function declared
580 but never defined" for functions marked with gnu_inline attribute.
581
d90c0a59
JJ
5822014-09-25 Jakub Jelinek <jakub@redhat.com>
583
584 PR c++/63249
585 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
586 on low_bound and length.
587
083e891e
MP
5882014-09-24 Marek Polacek <polacek@redhat.com>
589
590 PR c/61405
591 PR c/53874
592 * c-parser.c: Don't define CPP_KEYWORD.
593 (c_parser_switch_statement): Pass original type to c_finish_case.
594 * c-tree.h (c_finish_case): Update declaration.
595 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
596 conditionally to c_do_switch_warnings.
597
8d95fe25
MP
5982014-09-03 Marek Polacek <polacek@redhat.com>
599
600 PR c/62024
601 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
602 conversions.
603
9a771876
JJ
6042014-09-02 Jakub Jelinek <jakub@redhat.com>
605 Balaji V. Iyer <balaji.v.iyer@intel.com>
606 Igor Zamyatin <igor.zamyatin@intel.com>
607
608 * c-parser.c (c_parser_cilk_for): New function.
609 (c_parser_cilk_grainsize): Likewise.
610 (c_get_temp_regvar): Likewise.
611 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
612 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
613 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
614 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
615 case.
616
b7679d96
CG
6172014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
618
619 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
620 with using HOST_WIDE_INT without truncation to 'int'
621
59ea0364
MP
6222014-08-22 Marek Polacek <polacek@redhat.com>
623
624 PR c++/62199
625 * c-typeck.c (parser_build_binary_op): Adjust call to
626 warn_logical_not_parentheses.
627
671a475e
IZ
6282014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
629
630 PR other/62008
631 * c-parser.c (c_parser_array_notation): Check for correct
632 type of an array added.
633
04159acf
MP
6342014-08-19 Marek Polacek <polacek@redhat.com>
635
636 PR c++/62153
637 * c-typeck.c (build_binary_op): If either operand of a comparison
638 is a boolean expression, call maybe_warn_bool_compare.
639
c77935ee
PP
6402014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
641
642 PR c/45584
643 * c-typeck.c (build_c_cast): Do a conversion even when the
644 TYPE_MAIN_VARIANTs are the same.
645
35aff4fb
MP
6462014-08-19 Marek Polacek <polacek@redhat.com>
647
648 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
649 pedwarn_c99 instead of pedwarn.
650 (grokfield): Likewise.
651 (warn_defaults_to): New function.
652 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
653 Unconditionally call pedwarn_c99 instead of pedwarn.
654 (start_function): Call warn_defaults_to instead of pedwarn_c99.
655 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
656 check flag_isoc11 before.
657 * c-errors.c (pedwarn_c99): Change the return type to bool.
658 Handle -Wc99-c11-compat.
659 * c-parser.c (disable_extension_diagnostics): Handle
660 warn_c99_c11_compat.
661 (restore_extension_diagnostics): Likewise.
662 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
663 instead of pedwarn, don't check flag_isoc11 before.
664 (c_parser_declspecs): Likewise.
665 (c_parser_alignas_specifier): Likewise.
666 (c_parser_alignof_expression): Likewise.
667 (c_parser_generic_selection): Likewise.
668 * c-tree.h (pedwarn_c99): Update declaration.
669 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
670 of pedwarn_c99.
671
177cce46
MP
6722014-08-19 Marek Polacek <polacek@redhat.com>
673
674 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
675 to pedwarn_c90.
676 * c-errors.c: Include "opts.h".
677 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
678 * c-parser.c (disable_extension_diagnostics): Handle negative value
679 of warn_c90_c99_compat, too.
680 (restore_extension_diagnostics): Likewise.
681 (c_parser_compound_statement_nostart): Pass
682 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
683
6dc99c33
MP
6842014-08-12 Marek Polacek <polacek@redhat.com>
685
686 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
687 Add pedwarn.
688 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
689 Likewise.
690 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
691
f3bede71
MP
6922014-08-10 Marek Polacek <polacek@redhat.com>
693
694 PR c/51849
695 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
696 Call pedwarn_c90 instead of pedwarn.
697 (check_bitfield_type_and_width): Likewise.
698 (declspecs_add_qual): Likewise.
699 (declspecs_add_type): Likewise.
700 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
701 Adjust to only call pedwarn_c90.
702 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
703 pedwarn_c90 instead of pedwarn.
704 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
705 * c-parser.c (disable_extension_diagnostics): Handle
706 warn_c90_c99_compat.
707 (restore_extension_diagnostics): Likewise.
708 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
709 pedwarn_c90 instead of pedwarn.
710 (c_parser_initelt): Likewise.
711 (c_parser_postfix_expression): Likewise.
712 (c_parser_postfix_expression_after_paren_type): Likewise.
713 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
714 * c-tree.h: Fix formatting.
715 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
716 pedwarn_c90 instead of pedwarn.
717
9f25a338
TS
7182014-08-07 Trevor Saunders <tsaunders@mozilla.com>
719
720 * c-typeck.c: Remove include of pointer-set.h.
721
044331a8
MP
7222014-08-07 Marek Polacek <polacek@redhat.com>
723
724 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
725
b787e7a2
TS
7262014-08-02 Trevor Saunders <tsaunders@mozilla.com>
727
728 * c-typeck.c: Use hash_map instead of pointer_map.
729
6e2830c3
TS
7302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
731
732 * c-decl.c: Use hash_set instead of pointer_set.
733
a7ee52fb
IZ
7342014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
735
736 PR middle-end/61455
737 * c-array-notation.c (expand_array_notations): Handling
738 of DECL_EXPR added.
739
b4dfdc11
MG
7402014-07-31 Marc Glisse <marc.glisse@inria.fr>
741
742 PR c++/60517
743 * c-typeck.c (c_finish_return): Return 0 instead of the address of
744 a local variable.
745
976d5a22
TT
7462014-07-30 Tom Tromey <tromey@redhat.com>
747
748 * c-typeck.c (struct constructor_stack) <designator_depth>: New
749 field.
750 (really_start_incremental_init, push_init_level): Initialize
751 designator_depth.
752 (pop_init_level): Set global designator_depth.
753 (process_init_element): Check for designated_init attribute.
754
30281de2
MP
7552014-07-20 Marek Polacek <polacek@redhat.com>
756
757 PR c/61852
758 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
759 (implicitly_declare): Pass location to implicit_decl_warning.
760
b108f48f
JJ
7612014-07-14 Jakub Jelinek <jakub@redhat.com>
762
763 PR middle-end/61294
764 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
765 If non-NULL, call c_parser_check_literal_zero.
766 (c_parser_check_literal_zero): New function.
767 (c_parser_postfix_expression_after_primary): Adjust
768 c_parser_expr_list caller, handle -Wmemset-transposed-args.
769
773ec47f
MP
7702014-07-06 Marek Polacek <polacek@redhat.com>
771
772 PR c/6940
773 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
774 * c-tree.h (C_ARRAY_PARAMETER): Define.
775 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
776 function parameter.
777
22e1cf1c
JH
7782014-07-02 Jan Hubicka <hubicka@ucw.cz>
779 Chen Gang <gang.chen.5i5j@gmail.com>
780
781 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
782 releasing symbol.
783
52ec0ea3
MP
7842014-07-01 Marek Polacek <polacek@redhat.com>
785
786 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
787 instead of 0 to WARN_FOR_ASSIGNMENT.
788
d5c3d343
MP
7892014-07-01 Marek Polacek <polacek@redhat.com>
790
791 PR c/58286
792 * c-typeck.c (convert_for_assignment): Pass
793 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
794
6a7253a4
MP
7952014-06-30 Marek Polacek <polacek@redhat.com>
796
797 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
798 has no_sanitize_undefined attribute.
799
5e88a8f4
IZ
8002014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
801
802 PR middle-end/57541
803 * c-array-notation.c (fix_builtin_array_notation_fn):
804 Check for 0 arguments in builtin call. Check that bultin argument is
805 correct.
806 * c-parser.c (c_parser_array_notation): Check for incorrect initial
807 index.
808
9698b078
SH
8092014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
810
811 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
812 qualifiers in __auto_type for atomic types.
813 (c_parser_typeof_specifier): Discard all type qualifiers in
814 __typeof__ for atomic types.
815
6e07c515
MP
8162014-06-25 Marek Polacek <polacek@redhat.com>
817
818 PR c/61162
819 * c-parser.c (c_parser_statement_after_labels): Pass the location of
820 the return expression to c_finish_return.
821
da6f124d
JJ
8222014-06-25 Jakub Jelinek <jakub@redhat.com>
823
824 * c-typeck.c (c_finish_omp_clauses): Make sure
825 OMP_CLAUSE_LINEAR_STEP has correct type.
826
c203e8a7
TS
8272014-06-24 Trevor Saunders <tsaunders@mozilla.com>
828
829 * c-decl.c: Adjust.
830
56ad0e38
JJ
8312014-06-24 Jakub Jelinek <jakub@redhat.com>
832
833 * c-parser.c (c_parser_omp_for_loop): For
834 #pragma omp parallel for simd move lastprivate clause from parallel
835 to for rather than simd.
836
47c2554f
MP
8372014-06-23 Marek Polacek <polacek@redhat.com>
838
839 * c-typeck.c (parser_build_binary_op): Don't call
840 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
841
56363ffd
JH
8422014-06-15 Jan Hubicka <hubicka@ucw.cz>
843
844 * c-parser.c (c_parser_omp_threadprivate): Likewise.
845 * c-decl.c (merge_decls): Likewise.
846
d7ff7ae5
MP
8472014-06-09 Marek Polacek <polacek@redhat.com>
848
849 PR c/36446
850 * c-typeck.c (error_init): Call inform instead of error_at.
851 (pedwarn_init): Call inform instead of pedwarn.
852 (warning_init): Call inform instead of warning_at.
853
24d047a3
JH
8542014-06-07 Jan Hubicka <hubicka@ucw.cz>
855
856 * c-decl.c (merge_decls): Use set_decl_section_name.
857 (duplicate_decls): Remove node if it exists.
858
9bac5cbb
G
8592014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
860
861 PR c/53119
862 * c-typeck.c (push_init_level, process_init_element,
863 pop_init_level): Correct check for zero initialization, move
864 missing brace warning to respect zero initialization.
865
8ffcdea8
MP
8662014-06-05 Marek Polacek <polacek@redhat.com>
867
868 PR c/56724
869 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
870
742938c9
MP
8712014-06-05 Marek Polacek <polacek@redhat.com>
872
873 PR c/49706
874 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
875 on the left hand side operand of a comparison.
876
6447c55d
MP
8772014-06-05 Marek Polacek <polacek@redhat.com>
878
879 PR c/48062
880 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
881 Print note only if the warning was printed.
882
9dc7743c
IZ
8832014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
884
885 PR c/58942
886 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
887 with a pointer.
888
fedfecef
MP
8892014-06-03 Marek Polacek <polacek@redhat.com>
890
891 PR c/60439
892 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
893 c_start_case.
894 * c-tree.h (c_start_case): Update.
895 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
896 switch condition has boolean value.
897
9b2b7279
AM
8982014-06-02 Andrew MacLeod <amacleod@redhat.com>
899
900 * c-decl.c: Include builtins.h.
901 * c-parser.c: Likewise.
902
5c1bc275
MP
9032014-05-27 Marek Polacek <polacek@redhat.com>
904
905 PR c/56724
906 * c-typeck.c (convert_arguments): Get location of a parameter. Change
907 error and warning calls to error_at and warning_at. Pass location of
908 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
909 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
910 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
911
97563bc8
IZ
9122014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
913
914 PR c/61191
915 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
916 function parameters.
917
aede2c10
JH
9182014-05-23 Jan Hubicka <hubicka@ucw.cz>
919
920 * c-decl.c (merge_decls): Preserve symtab node pointers.
921 (duplicate_decls): Free new decl.
922
edbba2ce
TS
9232014-05-23 Thomas Schwinge <thomas@codesourcery.com>
924
f3316c6d
TS
925 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
926 initialization.
927
edbba2ce
TS
928 * c-parser.c (c_parser_omp_target): Return bool values.
929
68c81f24
TS
9302014-05-22 Thomas Schwinge <thomas@codesourcery.com>
931
932 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
933 num_teams_loc variable to num_thread_limit_loc.
934
632f2871
RS
9352014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
936
937 * c-array-notation.c (expand_array_notations): Use void_node
938 instead of void_zero_node.
939
766090c2
TS
9402014-05-17 Trevor Saunders <tsaunders@mozilla.com>
941
942 * c-decl.c (finish_struct): Adjust.
943 (finish_enum): Likewise.
944 (bind): Adjust.
945 (record_inline_static): Likewise.
946 (push_scope): Likewise.
947 (make_label): Likewise.
948 (lookup_label_for_goto): Likewise.
949 (finish_struct): Likewise.
950 (finish_enum): Likewise.
951 (store_parm_decls): Likewise.
952 (c_push_function_context): Likewise.
953 * c-lang.h: Remove usage of variable_size gty attribute.
954 * c-parser.c (c_parse_init): Adjust.
955 (c_parse_file): Likewise.
956
2b107f6b
MP
9572014-05-13 Marek Polacek <polacek@redhat.com>
958
959 PR c/61162
960 * c-typeck.c (convert_for_assignment): Pass location to
961 WARN_FOR_ASSIGNMENT instead of input_location.
962
d033409e
MP
9632014-05-10 Marek Polacek <polacek@redhat.com>
964
965 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
966 maybe_warn_string_init.
967 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
968 maybe_warn_string_init.
969 * c-tree.h (maybe_warn_string_init): Update declaration.
970 * c-typeck.c (maybe_warn_string_init): Add location parameter.
971 Call pedwarn_init with loc instead of with input_location.
972 (digest_init): Pass init_loc to maybe_warn_string_init.
973 (pop_init_level): Call pedwarn_init with loc instead of with
974 input_location.
975 (set_init_index): Likewise.
976 (process_init_element): Likewise.
977
ea58ef42
MP
9782014-05-09 Marek Polacek <polacek@redhat.com>
979
980 PR c/61096
981 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
982 (c_parser_initelt): Pass location to set_init_label. Pass array index
983 location to set_init_index.
984 * c-tree.h (push_init_level): Update declaration.
985 (pop_init_level): Likewise.
986 (set_init_index): Likewise.
987 (set_init_label): Likewise.
988 * c-typeck.c (error_init): Add location parameter. Call error_at
989 instead of error.
990 (digest_init): Pass init_loc to error_init.
991 (really_start_incremental_init):
992 (push_init_level): Add location parameter. Pass loc to pop_init_level
993 and error_init.
994 (pop_init_level): Likewise.
995 (set_designator): Add location parameter. Pass loc to pop_init_level,
996 push_init_level, and error_init.
997 (set_init_index): Add location parameter. Pass loc to error_init and
998 set_designator.
999 (set_init_label): Likewise.
1000 (output_init_element): Pass loc to error_init.
1001 (process_init_element): Pass loc to error_init, pop_init_level,
1002 pedwarn_init, and push_init_level.
1003
661a0813
MP
10042014-05-09 Marek Polacek <polacek@redhat.com>
1005
1006 PR c/50459
1007 * c-parser.c (c_parser_attributes): Parse the arguments as an
1008 expression-list if the attribute takes identifier.
1009
2793eeab
MP
10102014-05-08 Marek Polacek <polacek@redhat.com>
1011
1012 PR c/61053
1013 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1014 TYPE_ALIGN_UNIT.
1015
f827930a
MP
10162014-05-08 Marek Polacek <polacek@redhat.com>
1017
1018 PR c/61077
1019 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1020 of main.
1021
1d60af08
KZ
10222014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1023 Mike Stump <mikestump@comcast.net>
1024 Richard Sandiford <rdsandiford@googlemail.com>
1025
1026 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1027 (finish_enum): Use wide-int interfaces.
1028 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1029 * c-typeck.c (build_c_cast): Likewise.
1030 (set_nonincremental_init_from_string): Likewise.
1031 (c_tree_equal): Likewise.
1032
a0e24419
MP
10332014-05-02 Marek Polacek <polacek@redhat.com>
1034
1035 PR c/25801
1036 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1037 Return size_one_node when the type is not complete.
1038 (pointer_diff): Remove comment.
1039 (build_unary_op): Improve error messages.
1040
19fc9faa
MP
10412014-05-02 Marek Polacek <polacek@redhat.com>
1042
1043 * c-typeck.c (c_finish_return): Separate warning_at calls.
1044
63bc4e87
MP
10452014-05-02 Marek Polacek <polacek@redhat.com>
1046
1047 * c-tree.h (error_init): Remove declaration.
1048 (pedwarn_init): Likewise.
1049 * c-typeck.c (error_init): Make static and move above.
1050 (pedwarn_init): Likewise.
1051 (warning_init): Move above.
1052 (maybe_warn_string_init): Likewise.
1053
4bd2511b
JL
10542014-05-01 Jeff Law <law@redhat.com>
1055
1056 Revert:
1057
1058 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1059 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1060 avoid goto.
1061
6a358dcb
MP
10622014-05-02 Marek Polacek <polacek@redhat.com>
1063
1064 PR c/60784
1065 * c-typeck.c (push_init_level): Set constructor_designated to
1066 p->designated for structures.
1067
ae5ebda4
MP
10682014-05-01 Marek Polacek <polacek@redhat.com>
1069
1070 PR c/60915
1071 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1072 function-definition has an attribute after the declarator.
1073
96b40f8d
MP
10742014-05-01 Marek Polacek <polacek@redhat.com>
1075
1076 PR c/60257
1077 * c-typeck.c (warning_init): Add location_t parameter. Call
1078 warning_at instead of warning.
1079 (push_init_level): Pass input_location to warning_init.
1080 (add_pending_init): Add location_t parameter. Pass loc to
1081 warning_init.
1082 (set_nonincremental_init): Pass input_location to add_pending_init.
1083 (set_nonincremental_init_from_string): Likewise.
1084 (output_init_element): Pass loc to warning_init and to
1085 add_pending_init.
1086
32e00768
MP
10872014-05-01 Marek Polacek <polacek@redhat.com>
1088
1089 PR c/43395
1090 * c-typeck.c (c_finish_return): Distinguish between label and variable
1091 when warning about returning local address.
1092
c9379ce2
MP
10932014-05-01 Marek Polacek <polacek@redhat.com>
1094
1095 PR c/29467
1096 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1097 in C89 mode.
1098
d00887e8
MP
10992014-05-01 Marek Polacek <polacek@redhat.com>
1100
1101 PR c/43245
1102 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1103 instead of 0 to WARN_FOR_QUALIFIERS.
1104
5436fa2e
MP
11052014-05-01 Marek Polacek <polacek@redhat.com>
1106
1107 PR c/56989
1108 * c-typeck.c (default_conversion): Use better location for
1109 error call.
1110
f8ed5150
MP
11112014-04-30 Marek Polacek <polacek@redhat.com>
1112
1113 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1114 also when SANITIZE_FLOAT_DIVIDE is on.
1115
8337d1db
MP
11162014-04-30 Marek Polacek <polacek@redhat.com>
1117
1118 PR c/60139
1119 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1120 and pedwarn_init. Use loc insted of input_location.
1121
c4bdc42f
MP
11222014-04-30 Marek Polacek <polacek@redhat.com>
1123
1124 PR c/60351
1125 * c-typeck.c (build_binary_op): Use location when warning about
1126 shift count.
1127
45484dcf
MP
11282014-04-25 Marek Polacek <polacek@redhat.com>
1129
1130 PR c/18079
1131 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1132 always_inline/noinline and hot/cold attributes.
1133
34cf811f
MP
11342014-04-25 Marek Polacek <polacek@redhat.com>
1135
1136 PR c/60114
1137 * c-parser.c (c_parser_initelt): Pass input_location to
1138 process_init_element.
1139 (c_parser_initval): Pass loc to process_init_element.
1140 * c-tree.h (process_init_element): Adjust declaration.
1141 * c-typeck.c (push_init_level): Pass input_location to
1142 process_init_element.
1143 (pop_init_level): Likewise.
1144 (set_designator): Likewise.
1145 (output_init_element): Add location_t parameter. Pass loc to
1146 digest_init.
1147 (output_pending_init_elements): Pass input_location to
1148 output_init_element.
1149 (process_init_element): Add location_t parameter. Pass loc to
1150 output_init_element.
1151
42056eac
JJ
11522014-04-24 Jakub Jelinek <jakub@redhat.com>
1153
1154 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1155 atomic-clause, allow comma in between atomic-clause and
1156 seq_cst.
1157
e162a134
JJ
11582014-04-22 Jakub Jelinek <jakub@redhat.com>
1159
1160 PR c/59073
1161 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1162 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1163
2f6babac
IZ
11642014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1165
1166 PR middle-end/60469
1167 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1168 create_tmp_var instead build_decl for creating temps.
1169 (build_array_notation_expr): Likewise.
1170 (fix_conditional_array_notations_1): Likewise.
1171 (fix_array_notation_expr): Likewise.
1172 (fix_array_notation_call_expr): Likewise.
1173
8edbfaa6
JJ
11742014-03-28 Jakub Jelinek <jakub@redhat.com>
1175
1176 PR c++/60689
1177 * c-tree.h (c_build_function_call_vec): New prototype.
1178 * c-typeck.c (build_function_call_vec): Don't call
1179 resolve_overloaded_builtin here.
1180 (c_build_function_call_vec): New wrapper function around
1181 build_function_call_vec. Call resolve_overloaded_builtin here.
1182 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1183 Call c_build_function_call_vec instead of build_function_call_vec.
1184 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1185 * c-decl.c (finish_decl): Likewise.
1186
7485aeea
MLI
11872014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1188
1189 PR c/55383
1190 * c-typeck.c: Use correct format string in cast-qual warning
1191
b17a8b07
TS
11922014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1193
1194 * c-decl.c (c_decl_attributes): Use
1195 lang_hooks.types.omp_mappable_type.
1196 * c-typeck.c (c_finish_omp_clauses): Likewise.
1197
3af9c5e9
MP
11982014-03-06 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/60197
1201 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1202 of checking tree code.
1203
1c9f5f33
PK
12042014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1205
1206 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1207 (c_parser_parameter_declaration): Likewise.
1208
cc28fc7f
MP
12092014-02-19 Marek Polacek <polacek@redhat.com>
1210
1211 PR c/60195
1212 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1213 Call mark_exp_read on exp.value.
1214 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1215 TREE_ADDRESSABLE on old instead of val.
1216 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1217
b581c05c
PK
12182014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1219
1220 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1221 C_EXPR_APPEND by vec_safe_push.
1222 * c-tree.h (C_EXPR_APPEND): Remove.
1223
81e5eca8
MP
12242014-01-31 Marek Polacek <polacek@redhat.com>
1225
1226 PR c/59963
1227 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1228 build_function_call_vec.
1229 (build_function_call): Likewise.
1230 (build_atomic_assign): Likewise.
1231 (build_function_call_vec): Add arg_loc parameter. Use it.
1232 (convert_arguments): Likewise.
1233 (convert_for_assignment): Rename rhs_loc to expr_loc.
1234 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1235 (c_parser_objc_keywordexpr): Likewise.
1236 (c_parser_postfix_expression_after_primary): Call
1237 build_function_call_vec with expr_loc rather than op_loc.
1238 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1239 build_function_call_vec.
1240 (c_parser_expr_list): Add locations parameter. Fill it with locations
1241 of function arguments.
1242 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1243
68fca595
MP
12442014-01-30 Marek Polacek <polacek@redhat.com>
1245
1246 PR c/59940
1247 * c-typeck.c (build_function_call_vec): Use loc parameter.
1248 (convert_arguments): Add location parameter. Use it.
1249 (ep_convert_and_check): Likewise.
1250 (build_atomic_assign): Adjust convert_for_assignment call.
1251 (build_modify_expr): Likewise.
1252 (digest_init): Likewise.
1253 (c_finish_return): Likewise.
1254 (build_conditional_expr): Adjust ep_convert_and_check calls.
1255 (convert_for_assignment): Add rhs_loc parameter. Use it.
1256 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1257 calls.
1258
fa337f3a
RB
12592014-01-30 Richard Biener <rguenther@suse.de>
1260
1261 PR c/59905
1262 * c-typeck.c (build_function_call_vec): Do not replace calls
1263 to a function via an incompatible type with a runtime abort.
1264
b72271b9
BI
12652014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1266
1267 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1268 flag_enable_cilkplus with flag_cilkplus.
1269 (c_parser_direct_declarator_inner): Likewise.
1270 (c_parser_attribute_any_word): Likewise.
1271 (c_parser_attributes): Likewise.
1272 (c_parser_compound_statement): Likewise.
1273 (c_parser_statement_after_labels): Likewise.
1274 (c_parser_if_statement): Likewise.
1275 (c_parser_switch_statement): Likewise.
1276 (c_parser_do_statement): Likewise.
1277 (c_parser_for_statement): Likewise.
1278 (c_parser_unary_expression): Likewise.
1279 (c_parser_postfix_expression): Likewise.
1280 (c_parser_postfix_expression_after_primary): Likewise.
1281 (c_parser_postfix_expression_after_primary): Likewise.
1282 (c_parser_omp_clause_name): Likewise.
1283 (c_finish_omp_declare_simd): Likewise.
1284 (c_parser_cilk_verify_simd): Likewise.
1285 * c-typeck.c (build_array_ref): Likewise.
1286 (build_function_call_vec): Likewise.
1287 (convert_arguments): Likewise.
1288 (build_compound_expr): Likewise.
1289 (c_finish_return): Likewise.
1290 (c_finish_if_stmt): Likewise.
1291 (c_finish_loop): Likewise.
1292 (build_binary_op): Likewise.
1293
393e8e8b
MP
12942014-01-23 Marek Polacek <polacek@redhat.com>
1295
1296 PR c/59846
1297 * c-typeck.c (parser_build_binary_op): Use location instead of
1298 input_location.
1299 (build_binary_op): Pass location to shorten_compare.
1300
f04dda30
MP
13012014-01-23 Marek Polacek <polacek@redhat.com>
1302
1303 PR c/58346
1304 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1305 an empty aggregate.
1306
789eadcd
MP
13072014-01-23 Marek Polacek <polacek@redhat.com>
1308
1309 PR c/59871
1310 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1311 of a comma expression.
1312 (emit_side_effect_warnings): Likewise.
1313
40f14e9f
BI
13142014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1315
1316 PR c/59825
1317 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1318 function to use walk_tree and moved a lot of its functionality to
1319 expand_array_notations.
1320 (expand_array_notations): New function.
1321
74558dd9
BI
13222014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1323
1324 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1325 attribute an attribute without value.
1326
652fea39
JJ
13272014-01-23 Jakub Jelinek <jakub@redhat.com>
1328
1329 PR middle-end/58809
1330 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1331 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1332
f34f1c87
MP
13332014-01-22 Marek Polacek <polacek@redhat.com>
1334
1335 PR c/59891
1336 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1337 of remove_c_maybe_const_expr on op1 and op2.
1338
241f845a
JJ
13392014-01-15 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c/58943
1342 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1343 effects, preevaluate rhs using SAVE_EXPR first.
1344
9a74f20c
BI
13452014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1346
1347 PR c++/59631
1348 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1349 statements with if-elseif statements.
1350
96066ce1
MP
13512014-01-06 Marek Polacek <polacek@redhat.com>
1352
1353 PR c/57773
1354 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1355 defined bit-field types only in ISO C.
1356
23a5b65a
RS
13572014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1358
1359 Update copyright years
1360
f9030485
RS
13612014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1362
1363 * c-array-notation.c: Use the standard form for the copyright notice.
1364
41958c28
BI
13652013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1366
1367 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1368 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1369 field in parser is not empty. If not-empty, call the function
1370 c_parser_finish_omp_declare_simd.
1371 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1372 between SIMD-enabled functions and #pragma simd. Added new parameter.
1373 (c_parser_cilk_all_clauses): Modified the usage of the function
1374 c_parser_cilk_clause_vectorlength as mentioned above.
1375 (c_parser_cilk_simd_fn_vector_attrs): New function.
1376 (c_finish_cilk_simd_fn_tokens): Likewise.
1377 (is_cilkplus_vector_p): Likewise.
1378 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1379 "nomask," and "mask" strings in clause name.
1380 (c_parser_omp_all_clauses): Added 3 new case statements:
1381 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1382 PRAGMA_CILK_CLAUSE_NOMASK.
1383 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1384 check for vector attribute and if so call the function
1385 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1386 called the function c_finish_cilk_simd_fn_tokens.
1387 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1388 parser field is non-empty. If so, parse them as you would parse
1389 the omp declare simd pragma.
1390 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1391 Added a check when step is a parameter and flag it as error.
1392 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1393 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1394 pragma_omp_clause.
1395
cef0fd0e
TS
13962013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1397
1398 * c-parser.c (c_parser_omp_parallel): Fix description.
1399
12893402
BI
14002013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1401
1402 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1403 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1404 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1405 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1406
296674db
JM
14072013-12-04 Joseph Myers <joseph@codesourcery.com>
1408
1409 PR c/52023
1410 * c-parser.c (c_parser_alignas_specifier): Use
1411 c_sizeof_or_alignof_type instead of c_alignof.
1412 (c_parser_alignof_expression): Likewise, with min_alignof
1413 parameter depending on alignof spelling used.
1414
edd28054
MP
14152013-12-04 Marek Polacek <polacek@redhat.com>
1416
1417 PR c/54113
1418 * c-decl.c (start_function): Don't warn for missing prototype for
1419 inline functions.
1420
da0fc454
MP
14212013-12-03 Marek Polacek <polacek@redhat.com>
1422
1423 PR c/59351
1424 * c-decl.c (build_compound_literal): Allow compound literals with
1425 empty initial value.
1426
4c2ecab0
JM
14272013-12-02 Joseph Myers <joseph@codesourcery.com>
1428
1429 PR c/58235
1430 * c-typeck.c (build_modify_expr): Diagnose assignment to
1431 expression with array type.
1432
340baef7
JM
14332013-11-29 Joseph Myers <joseph@codesourcery.com>
1434
1435 PR c/42262
1436 * c-typeck.c (process_init_element): Do not treat a string as
1437 initializing a whole array when used with a designator for an
1438 individual element.
1439
6763b9f7
JM
14402013-11-29 Joseph Myers <joseph@codesourcery.com>
1441
1442 PR c/57574
1443 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1444 an inline function following a static declaration.
1445
e7bd1de1
JJ
14462013-11-28 Jakub Jelinek <jakub@redhat.com>
1447
1448 PR c/59310
1449 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1450 to p_name before calling c_parser_omp_teams instead of after.
1451 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1452 argument. Remove unused p_name variable.
1453
0136f8f0
AH
14542013-11-27 Aldy Hernandez <aldyh@redhat.com>
1455 Jakub Jelinek <jakub@redhat.com>
1456
1457 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1458 external_scope is NULL.
1459
241b71bb
TV
14602013-11-27 Tom de Vries <tom@codesourcery.com>
1461 Marc Glisse <marc.glisse@inria.fr>
1462
1463 PR c++/59032
1464 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1465
2fb9a547
AM
14662013-11-22 Andrew MacLeod <amacleod@redhat.com>
1467
1468 * c-typeck.c: Add required include files from gimple.h.
1469
8400e75e
DM
14702013-11-22 David Malcolm <dmalcolm@redhat.com>
1471
1472 * c-decl.c (define_label, shadow_tag_warned)
1473 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1474 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1475 (declspecs_add_type): Remove use of in_system_header macro.
1476 * c-parser.c (c_parser_unary_expression): Likewise.
1477 * c-typeck.c (store_init_value, process_init_element)
1478 (c_start_case): Likewise.
1479
1480 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1481 macro.
1482
1483 * c-parser.c (c_parser_set_source_position_from_token): Remove
1484 reference to in_system_header from comment.
1485
386b1f1f
RS
14862013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1487
1488 * c-decl.c (grokdeclarator): Update comment to refer to
1489 tree_to_[su]hwi rather than tree_low_cst.
1490
ae7e9ddd
RS
14912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1492
1493 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1494 tree_to_uhwi throughout.
1495
9439e9a1
RS
14962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1497
1498 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1499 throughout.
1500
9541ffee
RS
15012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1502
1503 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1504 throughout.
1505
c02065fc
AH
15062013-11-15 Aldy Hernandez <aldyh@redhat.com>
1507
1508 * c-parser.c (c_parser_cilk_simd): New.
1509 (c_parser_cilk_verify_simd): New.
1510 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1511 (c_parser_omp_for_loop): Add case for NE_EXPR.
1512 Set c_break_label for CILK_SIMD.
1513 (c_parser_cilk_clause_vectorlength): New.
1514 (c_parser_cilk_clause_linear): New.
1515 (c_parser_cilk_clause_name): New.
1516 (c_parser_cilk_all_clauses): New.
1517 * c-typeck.c (build_unary_op): Pass location argument to
1518 readonly_error.
1519 (build_modify_expr): Same.
1520 (build_asm_expr): Same.
1521 (c_finish_bc_stmt): Error on break/continue in loops.
1522
18f429e2
AM
15232013-11-14 Andrew MacLeod <amacleod@redhat.com>
1524
1525 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1526
d8a2d370
DN
15272013-11-14 Diego Novillo <dnovillo@google.com>
1528
1529 * c-decl.c: Include print-tree.h.
1530 Include stor-layout.h.
1531 Include varasm.h.
1532 Include attribs.h.
1533 Include stringpool.h.
1534 * c-lang.c: Include fold-const.h.
1535 * c-parser.c: Include stringpool.h.
1536 Include attribs.h.
1537 Include stor-layout.h.
1538 Include varasm.h.
1539 Include trans-mem.h.
1540 * c-typeck.c: Include stor-layout.h.
1541 Include trans-mem.h.
1542 Include varasm.h.
1543 Include stmt.h.
1544
38b7bc7f
JM
15452013-11-13 Joseph Myers <joseph@codesourcery.com>
1546
1547 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1548 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1549 __auto_type.
1550 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1551 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1552 RID_AUTO_TYPE.
1553 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1554 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1555 (c_parser_declarator, c_parser_direct_declarator_inner)
1556 (c_parser_parameter_declaration, c_parser_type_name): All callers
1557 changed.
1558 (c_parser_declaration_or_fndef): Handle declarations with type
1559 determined from the initializer.
1560
45b0be94
AM
15612013-11-12 Andrew MacLeod <amacleod@redhat.com>
1562
18f429e2 1563 * c-typeck.c: Include gimplify.h.
45b0be94 1564
582d9b50
JM
15652013-11-12 Joseph Myers <joseph@codesourcery.com>
1566
1567 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1568 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1569 comment.
1570 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1571 or _Thread_local as appropriate in diagnostics.
1572 (build_null_declspecs): Initialize ret->thread_gnu_p.
1573 (declspecs_add_scspec): Handle either __thread or _Thread_local
1574 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1575 pedantic. Do not disallow _Thread_local extern and _Thread_local
1576 static.
1577
267bac10
JM
15782013-11-07 Joseph Myers <joseph@codesourcery.com>
1579 Andrew MacLeod <amacleod@redhat.com>
1580
1581 * c-aux-info.c (gen_type): Handle atomic qualifier.
1582 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1583 qualifiers when compating types.
1584 (shadow_tag_warned): Handle atomic_p in declspecs.
1585 (quals_from_declspecs): Likewise.
1586 (start_decl): Use c_type_promotes_to when promoting argument
1587 types.
1588 (grokdeclarator): Handle _Atomic.
1589 (get_parm_info): Diagnose any qualifier on "void" as only
1590 parameter.
1591 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1592 comparing types. Use c_type_promotes_to when promoting argument
1593 types.
1594 (finish_function): Use c_type_promotes_to when promoting argument
1595 types.
1596 (build_null_declspecs): Handle atomic_p in declspecs.
1597 (declspecs_add_qual): Handle RID_ATOMIC.
1598 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1599 (c_token_starts_declspecs): Handle RID_ATOMIC.
1600 (c_parser_declspecs): Handle atomic type specifiers and
1601 qualifiers.
1602 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1603 from types of expressions with atomic type.
1604 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1605 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1606 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1607 (c_parser_statement_after_labels, c_parser_switch_statement)
1608 (c_parser_for_statement, c_parser_expr_no_commas)
1609 (c_parser_conditional_expression, c_parser_binary_expression)
1610 (c_parser_cast_expression, c_parser_unary_expression)
1611 (c_parser_postfix_expression)
1612 (c_parser_postfix_expression_after_primary, c_parser_expression):
1613 Use convert_lvalue_to_rvalue.
1614 (c_parser_expression_conv, c_parser_expr_list): Document
1615 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1616 (c_parser_objc_synchronized_statement): Use
1617 convert_lvalue_to_rvalue.
1618 (c_parser_objc_selector): Handle RID_ATOMIC.
1619 (c_parser_objc_receiver, c_parser_array_notation): Use
1620 convert_lvalue_to_rvalue.
1621 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1622 _Atomic (type-name).
1623 (struct c_declspecs): Add atomic_p field.
1624 (convert_lvalue_to_rvalue): Declare.
1625 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1626 corresponding atomic types.
1627 (qualify_type): Don't add _Atomic qualifiers from second argument.
1628 (comp_target_types): Do not allow _Atomic mismatches.
1629 (type_lists_compatible_p): Do not remove atomic qualifiers when
1630 comparing types.
1631 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1632 (build_atomic_assign): New functions.
1633 (build_unary_op): Use build_atomic_assign for atomic increment and
1634 decrement.
1635 (build_conditional_expr): Do not treat _Atomic void as a qualified
1636 version of void.
1637 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1638 (find_anonymous_field_with_type, convert_to_anonymous_field)
1639 (convert_for_assignment): Do not remove atomic qualifiers when
1640 comparing types.
1641 (digest_init): Do not accept initialization of arrays of atomic
1642 elements by string constants.
1643 (build_asm_expr): Use convert_lvalue_to_rvalue.
1644 (build_binary_op): Do not treat _Atomic void as a qualified
1645 version of void.
1646
0c249d4b
DD
16472013-11-06 DJ Delorie <dj@redhat.com>
1648
1649 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1650 both explicit and builtin, print the location of the explicit one.
1651
6d7f7e0a
TB
16522013-11-05 Tobias Burnus <burnus@net-b.de>
1653
1654 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1655 c_parser_omp_distribute, c_parser_omp_teams,
1656 c_parser_omp_target, c_parser_omp_declare): Handle
1657 -fopenmp-simd.
1658
b906f4ca
MP
16592013-11-03 Marek Polacek <polacek@redhat.com>
1660
1661 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1662
ee1d5a02
JJ
16632013-11-01 Jakub Jelinek <jakub@redhat.com>
1664
1665 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1666 check_dup_generic at the end, unless remove is true.
1667 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1668 remove = true;.
1669 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1670
5a9785fb
JJ
16712013-10-31 Jakub Jelinek <jakub@redhat.com>
1672
1673 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1674 with decl that is not pointer nor array.
1675
939b37da
BI
16762013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1677
1678 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1679 a spawning function is found.
1680 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1681 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1682 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1683 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1684 case.
1685 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1686 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1687 expr.
1688 (c_finish_return): Added a check to reject _Cilk_spawn in return
1689 expression.
1690 (build_cilk_spawn): New function.
1691 (build_cilk_sync): Likewise.
1692 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1693
d4af74d4
TB
16942013-10-27 Tobias Burnus <burnus@net-b.de>
1695
1696 PR other/33426
1697 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1698 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1699 (c_parser_statement_after_labels): Update calls.
1700
d73749df 17012013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1702
1703 PR other/33426
1704 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1705 Handle PRAGMA_IVDEP.
1706 (c_parser_statement_after_labels): Update call.
1707
f28aa681
MP
17082013-10-24 Marek Polacek <polacek@redhat.com>
1709
1710 * c-parser.c (c_parser_struct_declaration): Add a comment.
1711 (c_parser_declarator): Don't allow _Alignas here.
1712
0645c1a2
AM
17132013-10-17 Andrew MacLeod <amacleod@redhat.com>
1714
1715 * c-parser.c: Include omp-low.h.
1716 * c-typeck.c: Likewise.
1717
568a31f2
MP
17182013-10-17 Marek Polacek <polacek@redhat.com>
1719
1720 PR c/58267
1721 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1722 Document syntax of the array-declarator.
1723 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1724 are not permitted.
1725 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1726 (c_parser_struct_declaration): Likewise.
1727 (c_parser_declarator): Likewise.
1728 (c_parser_direct_declarator_inner): Likewise.
1729 (c_parser_parameter_declaration): Likewise.
1730 (c_parser_type_name): Likewise.
1731
acf0174b
JJ
17322013-10-11 Jakub Jelinek <jakub@redhat.com>
1733
1734 * c-lang.h (current_omp_declare_target_attribute): New extern
1735 decl.
1736 * c-parser.c: Include c-lang.h.
1737 (struct c_parser): Change tokens to c_token *.
1738 Add tokens_buf field. Change tokens_avail type to unsigned int.
1739 (c_parser_consume_token): If parser->tokens isn't
1740 &parser->tokens_buf[0], increment parser->tokens.
1741 (c_parser_consume_pragma): Likewise.
1742 (enum pragma_context): Add pragma_struct and pragma_param.
1743 (c_parser_external_declaration): Adjust
1744 c_parser_declaration_or_fndef caller.
1745 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1746 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1747 Adjust recursive call.
1748 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1749 of pragma_external.
1750 (c_parser_parameter_declaration): Use pragma_param instead of
1751 pragma_external.
1752 (c_parser_compound_statement_nostart, c_parser_label,
1753 c_parser_for_statement): Adjust
1754 c_parser_declaration_or_fndef callers.
1755 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1756 it through to c_parser_conditional_expression.
1757 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1758 pass it through to c_parser_binary_expression. Adjust recursive
1759 call.
1760 (c_parser_binary_expression): Remove prec argument, add
1761 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1762 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1763 binop matches it, use build2 instead of parser_build_binary_op.
1764 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1765 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1766 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1767 Handle pragma_struct and pragma_param the same as pragma_external.
1768 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1769 (c_parser_omp_variable_list): Parse array sections for
1770 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1771 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1772 (c_parser_omp_clause_reduction): Handle user defined reductions.
1773 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1774 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1775 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1776 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1777 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1778 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1779 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1780 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1781 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1782 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1783 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1784 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1785 (c_parser_omp_for_loop): Add CODE argument, pass it through
1786 to c_finish_omp_for. Change last argument to cclauses,
1787 and adjust uses to grab parallel clauses from the array of all
1788 the split clauses. Adjust c_parser_binary_expression,
1789 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1790 (omp_split_clauses): New function.
1791 (c_parser_omp_simd): New function.
1792 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1793 Allow the function to be called also when parsing combined constructs,
1794 and call c_parser_omp_simd when parsing for simd.
1795 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1796 #pragma omp section, require exactly one structured-block instead of
1797 sequence of statements.
1798 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1799 Allow the function to be called also when parsing combined constructs.
1800 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1801 Allow the function to be called also when parsing combined
1802 constructs.
1803 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1804 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1805 c_parser_omp_teams, c_parser_omp_target_data,
1806 c_parser_omp_target_update, c_parser_omp_target,
1807 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1808 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1809 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1810 (c_parser_omp_construct): Add p_name and mask vars. Handle
1811 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1812 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1813 and c_parser_omp_sections callers.
1814 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1815 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1816 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1817 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1818 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1819 OMP_CLAUSE_DEPEND.
1820 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1821 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1822 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1823 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1824 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1825 * c-typeck.c: Include tree-inline.h.
1826 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1827 handle_omp_array_sections_1, handle_omp_array_sections,
1828 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1829 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1830 user defined reductions.
1831 (c_tree_equal): New function.
1832 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1833 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1834 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1835 c_check_omp_declare_reduction_r): New prototypes.
1836 * c-decl.c (current_omp_declare_target_attribute): New variable.
1837 (c_decl_attributes): New function.
1838 (start_decl, start_function): Use it instead of decl_attributes.
1839 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1840 c_omp_reduction_decl, c_omp_reduction_lookup,
1841 c_check_omp_declare_reduction_r): New functions.
1842
0a6c2227
TT
18432013-09-25 Tom Tromey <tromey@redhat.com>
1844
1845 * Make-lang.in (c/gccspec.o): Remove.
1846 (CFLAGS-c/gccspec.o): New variable.
1847 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1848 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1849 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1850
f3bc55f0
TT
18512013-09-25 Tom Tromey <tromey@redhat.com>
1852
1853 * Make-lang.in (c/gccspec.o): Don't use subshell.
1854
a24d975c
MP
18552013-09-18 Marek Polacek <polacek@redhat.com>
1856
1857 PR sanitize/58443
1858 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1859 Remove unnecessary check.
1860
ce6923c5
MP
18612013-09-18 Marek Polacek <polacek@redhat.com>
1862
1863 PR sanitizer/58411
1864 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1865 no_sanitize_undefined attribute.
1866
a1e51df9
KT
18672013-09-13 Kai Tietz <ktietz@redhat.com>
1868
1869 PR target/57848
1870 * c-decl.c (c_builtin_function_ext_scope): Remove
1871 wrong assumption that it is never called on prexisting
1872 symbol.
1873
0af94e6f
JR
18742013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1875
1876 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1877
20059c8b
GDR
18782013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1879
1880 * c-objc-common.c (c_tree_printer): Tidy.
1881
de5a5fa1
MP
18822013-08-30 Marek Polacek <polacek@redhat.com>
1883
1884 * c-typeck.c (build_binary_op): Add division by zero and shift
1885 instrumentation.
1886
2531a1d9 18872013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1888 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1889
6e2bcc98 1890 PR c/35649
2531a1d9
JR
1891 * c-typeck.c (c_common_type): Prefer double_type_node over
1892 other REAL_TYPE types with the same precision.
1893 (convert_arguments): Likewise.
1894
025311c4
GDR
18952013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1896
1897 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1898 (c_initialize_diagnostics): Call a destructor for the early printer.
1899
da6ca2b5
GDR
19002013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1901
1902 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1903 printer initialization.
1904
318cda85 19052013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1906
318cda85
BI
1907 PR c/57490
1908 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1909 check for truth values.
1910 (expand_array_notation_exprs): Added truth values case. Removed an
1911 unwanted else. Added for-loop to walk through subtrees in default
1912 case.
1913
b066401f
GDR
19142013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1915
1916 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1917
fb48aadc
JM
19182013-07-23 Joseph Myers <joseph@codesourcery.com>
1919
1920 * c-parser.c (struct c_generic_association): Fix typo.
1921
433cc7b0
TT
19222013-07-23 Tom Tromey <tromey@redhat.com>
1923 Joseph Myers <joseph@codesourcery.com>
1924
1925 * c-parser.c (struct c_generic_association): New.
1926 (c_generic_association_d): New typedef.
1927 (c_parser_generic_selection): New function.
1928 (c_parser_postfix_expression): Handle RID_GENERIC.
1929
26d40c3d
JM
19302013-07-13 Jason Merrill <jason@redhat.com>
1931
1932 PR c++/57793
1933 * c-decl.c (finish_struct): Check for too-large class.
1934
ecdbd01a 19352013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1936
1937 PR c/57821
1938 * c-typeck.c (set_init_index): When folding, check for index overflow.
1939
1141ed3f
BI
19402013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1941
1942 * c-parser.c (c_parser_array_notation): Removed rejection of array
1943 notations in an array of function pointers.
1944
713b46fa
BI
19452013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1946
1947 * c-array-notation.c (make_triplet_val_inv): New function.
1948 (create_cmp_incr): Likewise.
1949 (create_array_refs): Likewise.
1950 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1951 Also modularized common parts between functions and called the function.
1952 (build_array_notation_expr): Likewise.
1953 (fix_conditional_array_notations_1): Likewise.
1954 (fix_array_notation_expr): Likewise.
1955 (fix_array_notation_call_expr): Likewise.
1956
92f20202
MP
19572013-06-18 Marek Polacek <polacek@redhat.com>
1958
1959 PR c/57630
1960 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1961
73a23b06
BI
19622013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1963
1964 * c-array-notation.c (build_array_notation_expr): Reject array notation
1965 mismatch between LHS and RHS even inside a call_expr. Also, removed
1966 a couple while statements that were dead code.
1967
00b8517d
BI
19682013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1969
1970 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1971 excessive precision expressions in function parameters. Also removed
1972 couple unwanted while statements.
1973
1509bdda
BI
19742013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1975
1976 * c-array-notation.c (expand_array_notation_exprs): Added
1977 ARRAY_NOTATION_REF case.
1978
d60f1706
BI
19792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1980
1981 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1982 function to c-family/array-notation-common.c.
1983 (is_cilkplus_reduce_builtin): Likewise.
1984 (find_rank): Likewise.
1985 (extract_array_notation_exprs): Likewise.
1986 (replace_array_notations): Likewise.
1987 (find_inv_trees): Likewise.
1988 (replace_inv_trees): Likewise.
1989 (contains_array_notation_expr): Likewise.
1990 (find_correct_array_notation_type): Likewise.
1991 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1992 (struct inv_list): Moved this to c-family/array-notation-common.c.
1993 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1994
6d6efbb3
BI
19952013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1996
1997 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1998 reduction functions outside the for-loop. Added a check if the fundecl
1999 is non-NULL. Finally, removed an unwanted if-statement, and made the
2000 body unconditional.
2001
25c22937
BI
20022013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2003
2004 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2005 condition of the if-statement matches the rank of else-block and then-
2006 block when array notations are used.
2007 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2008 expression after the entire function body is parsed.
2009 (c_parser_expr_no_commas): Delayed creating array notation expressions
2010 to the end of function parsing.
2011 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2012 whole if-statement instead of just the condition.
2013 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2014
edd25645
BI
20152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2016
2017 PR c/57474
2018 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2019 array to NULL_TREE if they are unused. Also added a check for the
2020 field to be NULL before its fields are used in future.
2021
065ce7f1
RO
20222013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2023
2024 PR bootstrap/57450
2025 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2026 (build_array_notation_expr): Likewise.
2027
36536d79
BI
20282013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2029
2030 * c-typeck.c (build_array_ref): Added a check to see if array's
2031 index is greater than one. If true, then emit an error.
2032 (build_function_call_vec): Exclude error reporting and checking
2033 for builtin array-notation functions.
2034 (convert_arguments): Likewise.
2035 (c_finish_return): Added a check for array notations as a return
2036 expression. If true, then emit an error.
2037 (c_finish_loop): Added a check for array notations in a loop
2038 condition. If true then emit an error.
2039 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2040 (build_binary_op): Added a check for array notation expr inside
2041 op1 and op0. If present, we call another function to find correct
2042 type.
2043 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2044 * c-parser.c (c_parser_compound_statement): Check if array
2045 notation code is used in tree, if so, then transform them into
2046 appropriate C code.
2047 (c_parser_expr_no_commas): Check if array notation is used in LHS
2048 or RHS, if so, then build array notation expression instead of
2049 regular modify.
2050 (c_parser_postfix_expression_after_primary): Added a check for
2051 colon(s) after square braces, if so then handle it like an array
2052 notation. Also, break up array notations in unary op if found.
2053 (c_parser_direct_declarator_inner): Added a check for array
2054 notation.
2055 (c_parser_compound_statement): Added a check for array notation in
2056 a stmt. If one is present, then expand array notation expr.
2057 (c_parser_if_statement): Likewise.
2058 (c_parser_switch_statement): Added a check for array notations in
2059 a switch statement's condition. If true, then output an error.
2060 (c_parser_while_statement): Similarly, but for a while.
2061 (c_parser_do_statement): Similarly, but for a do-while.
2062 (c_parser_for_statement): Similarly, but for a for-loop.
2063 (c_parser_unary_expression): Check if array notation is used in a
2064 pre-increment or pre-decrement expression. If true, then expand
2065 them.
2066 (c_parser_array_notation): New function.
2067 * c-array-notation.c: New file.
2068 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2069
cd192ccc
MS
20702013-05-23 Mike Stump <mikestump@comcast.net>
2071
2072 * c-typeck.c (convert_for_assignment): Handle references to memory
2073 spaces better.
2074
427b248d
JM
20752013-05-16 Jason Merrill <jason@redhat.com>
2076
2077 * Make-lang.in (cc1$(exeext)): Use link mutex.
2078
44d90fe1
PC
20792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2080
2081 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2082 to simply use OPT_Wpointer_arith.
2083 (build_unary_op): Likewise.
2084
4e7d7b3d
JJ
20852013-04-03 Jakub Jelinek <jakub@redhat.com>
2086
2087 PR c/19449
2088 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2089 argument. If set, or it temporarily for parsing of the first
2090 argument into force_folding_builtin_constant_p.
2091 (c_parser_postfix_expression): Adjust callers.
2092
839b422f
RB
20932013-03-21 Richard Biener <rguenther@suse.de>
2094
2095 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2096 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2097
2ee028f1
MP
20982013-02-12 Marek Polacek <polacek@redhat.com>
2099
2100 PR c/44938
2101 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2102 origtypes to NULL.
2103
8824edff
JJ
21042013-01-24 Jakub Jelinek <jakub@redhat.com>
2105
2106 PR c/56078
2107 * c-typeck.c (set_nonincremental_init_from_string): If
2108 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2109 returned false.
2110 (process_init_element): Likewise.
2111
eadd3d0d
JJ
21122012-12-20 Jakub Jelinek <jakub@redhat.com>
2113
2114 PR c++/55619
2115 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2116 argument, don't call default_function_array_conversion
2117 nor c_fully_fold here.
2118 (c_parser_asm_statement): Adjust callers.
2119 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2120 and outputs here, and call default_function_array_conversion
2121 on inputs that don't need to be addressable.
2122
f8a93a2e
JJ
21232012-12-18 Jakub Jelinek <jakub@redhat.com>
2124
2125 PR c/39464
2126 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2127 warning require that both c_common_unsigned_type as well as
2128 c_common_signed_type is the same for both mvl and mvr types.
2129
9771b263
DN
21302012-11-16 Diego Novillo <dnovillo@google.com>
2131
2132 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2133
2134 * c-common.c: Use new vec API in vec.h.
2135 * c-common.h: Likewise.
2136 * c-gimplify.c: Likewise.
2137 * c-pragma.c: Likewise.
2138 * c-pretty-print.c: Likewise.
2139 * c-pretty-print.h: Likewise.
2140 * c-semantics.c: Likewise.
2141 * c-decl.c: Likewise.
2142 * c-parser.c: Likewise.
2143 * c-tree.h: Likewise.
2144 * c-typeck.c: Likewise.
2145
880661a4
JW
21462012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2147
2148 PR c++/54930
2149 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2150
077d1abe
MLI
21512012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2152
2153 PR c/53066
2154 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2155 shadows a function, unless the variable is a function or a
2156 pointer-to-function.
2157
3a785c97
JJ
21582012-10-12 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR c/54381
2161 * c-parser.c (struct c_tree_loc_pair): Removed.
2162 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2163 add location_t * and tree * arguments, fill in array of 3
2164 sizeof_arg trees and corresponding locs.
2165 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2166 c_parser_expr_list callers.
2167 (c_parser_postfix_expression_after_primary): Likewise. Pass
2168 array of 3 sizeof_arg trees and locs (corresponding to first
2169 3 arguments) to sizeof_pointer_memaccess_warning.
2170
703c8606
LC
21712012-10-09 Lawrence Crowl <crowl@google.com>
2172
2173 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2174 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2175 hash table.
2176
5d9de0d0
PC
21772012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2178
2179 PR c++/54194
2180 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2181 call.
2182
a212e43f
MG
21832012-10-09 Marc Glisse <marc.glisse@inria.fr>
2184
2185 PR c++/54427
2186 * c-typeck.c: Include c-common.h.
2187 (enum stv_conv): Moved to c-common.h.
2188 (scalar_to_vector): Moved to c-common.c.
2189 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2190 * Make-lang.in: c-typeck.c depends on c-common.h.
2191
3b78de56
AC
21922012-10-04 Arnaud Charlet <charlet@adacore.com>
2193
2194 * c-decl.c (c_write_global_declarations): Fix handling of
2195 -fdump-ada-spec*.
2196
78c60e3d
SS
21972012-09-30 Sharad Singhai <singhai@google.com>
2198
2199 * c-decl.c (c_write_global_declarations): Use a different method
2200 to determine if the dump has ben initialized.
2201
9f33203d
JM
22022012-09-14 Joseph Myers <joseph@codesourcery.com>
2203
2204 PR c/54552
2205 * c-typeck.c (c_cast_expr): When casting to a type requiring
2206 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2207 c_fully_fold first.
2208
a27d595d
JM
22092012-09-14 Joseph Myers <joseph@codesourcery.com>
2210
2211 PR c/54103
2212 * c-typeck.c (build_unary_op): Pass original argument of
2213 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2214 any C_MAYBE_CONST_EXPR, if it has integer operands.
2215 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2216 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2217 to c_objc_common_truthvalue_conversion, then remove any
2218 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2219 c_objc_common_truthvalue_conversion not
2220 c_common_truthvalue_conversion.
2221 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2222 call note_integer_operands for arguments with integer operands
2223 that are not integer constants.
2224
9feb29df
JJ
22252012-09-13 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR c/54559
2228 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2229 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2230
d409320c
JJ
22312012-08-31 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c/54428
2234 * c-convert.c (convert): Don't call fold_convert_loc if
2235 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2236 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2237 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2238
6265d07c
JJ
22392012-08-24 Jakub Jelinek <jakub@redhat.com>
2240
2241 PR c/54355
2242 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2243 for nested and empty_ok arguments in the call to
2244 c_parser_declaration_or_fndef.
2245
1a4049e7
JJ
22462012-08-17 Jakub Jelinek <jakub@redhat.com>
2247
2248 * c-tree.h (c_last_sizeof_arg): Declare.
2249 * c-parser.c (struct c_tree_loc_pair): New type.
2250 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2251 non-NULL.
2252 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2253 (c_parser_postfix_expression_after_primary): Likewise. Call
2254 sizeof_pointer_memaccess_warning if needed.
2255 (sizeof_ptr_memacc_comptypes): New function.
2256 * c-typeck.c (c_last_sizeof_arg): New global variable.
2257 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2258
0229aee9
UB
22592012-07-24 Uros Bizjak <ubizjak@gmail.com>
2260
2261 * c-lang.h (lang_decl): Add variable_size GTY option.
2262
7ee2468b
SB
22632012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2264
2265 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2266 * Make-lang.in: Fix dependencies.
2267
d4a10d0a
SB
22682012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2269
2270 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2271 and add language Makefile hooks.
2272 * config-lang.in: New file.
2273 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2274 add the required "normal" config-lang.in rules.
2275 * c-lang.h: Moved from gcc/ to here.
2276 * c-tree.h: Likewise.
2277 * c-objc-common.c: Likewise.
2278 * c-objc-common.h: Likewise.
2279 * c-typeck.c: Likewise.
2280 * c-convert.c: Likewise.
2281 * c-lang.c: Likewise.
2282 * c-aux-info.c: Likewise.
2283 * c-errors.c: Likewise.
2284 * gccspec.c: Likewise.
2285 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2286 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2287\f
5624e564 2288Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2289
2290Copying and distribution of this file, with or without modification,
2291are permitted in any medium without royalty provided the copyright
2292notice and this notice are preserved.